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

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