diff --git a/util.c b/util.c
index 59db9cb..e03f6cd 100644
--- a/util.c
+++ b/util.c
@@ -199,10 +199,8 @@ const char *next_string(const char *string,
unsigned long *secsize)
  */
 int __attribute__ ((pure)) native_endianness()
 {
-       /* Encoding the endianness enums in a string and then reading that
-        * string as a 32-bit int, returns the correct endianness automagically.
-        */
-       return (char) *((uint32_t*)("\1\0\0\2"));
+       uint32_t enums = 0x02000001;
+       return *((uint8_t*)&enums);
 }

 /*
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to