aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2013-08-26 10:12:52 -0400
committerJeff Mahoney <jeffm@suse.com>2013-08-26 19:00:02 -0400
commit0a714b047748769e65fda5467e4766ded8c54800 (patch)
treea0649fa71339a65937b842de57bc3e7e02593d84
parent4ff866cd6c2e36741ebc70780b38740ef343e573 (diff)
downloadreiserfsprogs-0a714b047748769e65fda5467e4766ded8c54800.tar.gz
swab: protect le32_to_cpu and friends against being defined twice
When used as part of another project, these macros may already be defined. Signed-off-by: Jeff Mahoney <jeffm@suse.com>
-rw-r--r--include/swab.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/swab.h b/include/swab.h
index 945e4e9..319510a 100644
--- a/include/swab.h
+++ b/include/swab.h
@@ -41,6 +41,7 @@
(__u64)(((__u64)(__x) & (__u64)0xff00000000000000ULL) >> 56) )); \
})
+#ifndef le32_to_cpu
#if __BYTE_ORDER == __LITTLE_ENDIAN
# define cpu_to_le16(val) (val)
@@ -62,5 +63,6 @@
#else
# error "nuxi/pdp-endian archs are not supported"
#endif
+#endif
#endif /* REISERFS_SWAB_H */