summaryrefslogtreecommitdiff
path: root/modutils/insmod.c
diff options
context:
space:
mode:
authorRob Landley2006-03-04 22:40:25 +0000
committerRob Landley2006-03-04 22:40:25 +0000
commit688ed0d7606c0563073f588098b9bedf904c70a9 (patch)
tree123b85ec83aede5c1323d95297dc6d67f3b9e1f5 /modutils/insmod.c
parentd9969ea175503bdd37fdc966a0ed38bb6f81ff89 (diff)
downloadbusybox-688ed0d7606c0563073f588098b9bedf904c70a9.zip
busybox-688ed0d7606c0563073f588098b9bedf904c70a9.tar.gz
Patch from Robert P. Day, moving byte order checks to use platform.h macros.
Diffstat (limited to 'modutils/insmod.c')
-rw-r--r--modutils/insmod.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index d40012d..14322d9 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -268,8 +268,8 @@ extern int insmod_ng_main( int argc, char **argv);
#define CONFIG_USE_SINGLE
/* the SH changes have only been tested in =little endian= mode */
/* I'm not sure about big endian, so let's warn: */
-#if defined(__sh__) && defined(__BIG_ENDIAN__)
-#error insmod.c may require changes for use on big endian SH
+#if defined(__sh__) && BB_BIG_ENDIAN
+# error insmod.c may require changes for use on big endian SH
#endif
/* it may or may not work on the SH1/SH2... Error on those also */
#if ((!(defined(__SH3__) || defined(__SH4__) || defined(__SH5__)))) && (defined(__sh__))
@@ -511,10 +511,10 @@ static const int MODUTILS_OBJ_H = 1;
#include <elf.h>
#include <endian.h>
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define ELFDATAM ELFDATA2LSB
-#elif __BYTE_ORDER == __BIG_ENDIAN
-#define ELFDATAM ELFDATA2MSB
+#if BB_LITTLE_ENDIAN
+# define ELFDATAM ELFDATA2LSB
+#else
+# define ELFDATAM ELFDATA2MSB
#endif
#ifndef ElfW