summaryrefslogtreecommitdiffstats
path: root/include/usb/usb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/usb/usb.h')
-rw-r--r--include/usb/usb.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/usb/usb.h b/include/usb/usb.h
index 296e4e8ea8..8691400014 100644
--- a/include/usb/usb.h
+++ b/include/usb/usb.h
@@ -270,12 +270,14 @@ void usb_rescan(void);
((x_ & 0xFF000000UL) >> 24)); \
})
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifdef __LITTLE_ENDIAN
# define swap_16(x) (x)
# define swap_32(x) (x)
-#else
+#elif defined BIG_ENDIAN
# define swap_16(x) __swap_16(x)
# define swap_32(x) __swap_32(x)
+#else
+#error "could not determine byte order"
#endif
/*