OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../mdadm/mdadm-3.2.2-uclibc-undef-bswap.patch
  5. # Copyright (C) 2011 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- mdadm-3.2.2/mdadm.h.orig 2011-08-21 17:28:09.784095978 +0200
  17. +++ mdadm-3.2.2/mdadm.h 2011-08-21 17:38:25.640080868 +0200
  18. @@ -113,6 +113,17 @@
  19. * and there is no standard conversion function so... */
  20. /* And dietlibc doesn't think byteswap is ok, so.. */
  21. /* #include <byteswap.h> */
  22. +/* uClibc >= 0.9.32 pulls in byteswap.h when including endian.h
  23. + * and by defining _USE_BSD, thus we have to undef their
  24. + * incompatible bswap functions in favour of the internal
  25. + * implementations.
  26. + */
  27. +#ifdef __UCLIBC__
  28. +# undef bswap_16
  29. +# undef bswap_32
  30. +# undef bswap_64
  31. +#endif
  32. +
  33. #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
  34. ((x) & 0xff00U) >> 8)
  35. #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \