From 0a714b047748769e65fda5467e4766ded8c54800 Mon Sep 17 00:00:00 2001 From: Jeff Mahoney Date: Mon, 26 Aug 2013 10:12:52 -0400 Subject: [PATCH] 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 --- include/swab.h | 2 ++ 1 file changed, 2 insertions(+) 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 */