diff --git a/include/odp_byteorder.h b/include/odp_byteorder.h
index c573bb6..4b35da9 100644
--- a/include/odp_byteorder.h
+++ b/include/odp_byteorder.h
@@ -22,21 +22,11 @@ extern "C" {
 #include <odp_std_types.h>
 #include <odp_compiler.h>
 
-#ifndef BYTE_ORDER
-#error BYTE_ORDER not defined!
-#endif
-
-/** Big endian byte order */
-#define ODP_BIG_ENDIAN    BIG_ENDIAN
 
-/** Little endian byte order */
-#define ODP_LITTLE_ENDIAN LITTLE_ENDIAN
-
-/** Selected byte order */
-#if BYTE_ORDER == LITTLE_ENDIAN
-#define ODP_BYTE_ORDER ODP_LITTLE_ENDIAN
-#elif BYTE_ORDER == BIG_ENDIAN
-#define ODP_BYTE_ORDER ODP_BIG_ENDIAN
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define ODP_LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
+#else
+#define ODP_BIG_ENDIAN    __ORDER_BIG_ENDIAN__
 #endif
 
 
@@ -75,7 +65,7 @@ typedef uint64_t __odp_bitwise	uint64be_t; /**< unsigned 64bit big endian */
  */
 static inline uint16_t odp_be_to_cpu_16(uint16be_t be16)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return __odp_builtin_bswap16((__odp_force uint16_t)be16);
 #else
 	return (__odp_force uint16_t)be16;
@@ -89,7 +79,7 @@ static inline uint16_t odp_be_to_cpu_16(uint16be_t be16)
  */
 static inline uint32_t odp_be_to_cpu_32(uint32be_t be32)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return __builtin_bswap32((__odp_force uint32_t)be32);
 #else
 	return (__odp_force uint32_t)be32;
@@ -103,7 +93,7 @@ static inline uint32_t odp_be_to_cpu_32(uint32be_t be32)
  */
 static inline uint64_t odp_be_to_cpu_64(uint64be_t be64)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return __builtin_bswap64((__odp_force uint64_t)be64);
 #else
 	return (__odp_force uint64_t)be64;
@@ -122,7 +112,7 @@ static inline uint64_t odp_be_to_cpu_64(uint64be_t be64)
  */
 static inline uint16be_t odp_cpu_to_be_16(uint16_t cpu16)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return (__odp_force uint16be_t)__odp_builtin_bswap16(cpu16);
 #else
 	return (__odp_force uint16be_t)cpu16;
@@ -136,7 +126,7 @@ static inline uint16be_t odp_cpu_to_be_16(uint16_t cpu16)
  */
 static inline uint32be_t odp_cpu_to_be_32(uint32_t cpu32)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return (__odp_force uint32be_t)__builtin_bswap32(cpu32);
 #else
 	return (__odp_force uint32be_t)cpu32;
@@ -150,7 +140,7 @@ static inline uint32be_t odp_cpu_to_be_32(uint32_t cpu32)
  */
 static inline uint64be_t odp_cpu_to_be_64(uint64_t cpu64)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return (__odp_force uint64be_t)__builtin_bswap64(cpu64);
 #else
 	return (__odp_force uint64be_t)cpu64;
@@ -169,7 +159,7 @@ static inline uint64be_t odp_cpu_to_be_64(uint64_t cpu64)
  */
 static inline uint16_t odp_le_to_cpu_16(uint16le_t le16)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return (__odp_force uint16_t)le16;
 #else
 	return __odp_builtin_bswap16((__odp_force uint16_t)le16);
@@ -183,7 +173,7 @@ static inline uint16_t odp_le_to_cpu_16(uint16le_t le16)
  */
 static inline uint32_t odp_le_to_cpu_32(uint32le_t le32)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return (__odp_force uint32_t)le32;
 #else
 	return __builtin_bswap32((__odp_force uint32_t)le32);
@@ -197,7 +187,7 @@ static inline uint32_t odp_le_to_cpu_32(uint32le_t le32)
  */
 static inline uint64_t odp_le_to_cpu_64(uint64le_t le64)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return (__odp_force uint64_t)le64;
 #else
 	return __builtin_bswap64((__odp_force uint64_t)le64);
@@ -216,7 +206,7 @@ static inline uint64_t odp_le_to_cpu_64(uint64le_t le64)
  */
 static inline uint16le_t odp_cpu_to_le_16(uint16_t cpu16)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return (__odp_force uint16le_t)cpu16;
 #else
 	return (__odp_force uint16le_t)__odp_builtin_bswap16(cpu16);
@@ -230,7 +220,7 @@ static inline uint16le_t odp_cpu_to_le_16(uint16_t cpu16)
  */
 static inline uint32le_t odp_cpu_to_le_32(uint32_t cpu32)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return (__odp_force uint32le_t)cpu32;
 #else
 	return (__odp_force uint32le_t)__builtin_bswap32(cpu32);
@@ -244,7 +234,7 @@ static inline uint32le_t odp_cpu_to_le_32(uint32_t cpu32)
  */
 static inline uint64le_t odp_cpu_to_le_64(uint64_t cpu64)
 {
-#if ODP_BYTE_ORDER == ODP_LITTLE_ENDIAN
+#if ODP_LITTLE_ENDIAN
 	return (__odp_force uint64le_t)cpu64;
 #else
 	return (__odp_force uint64le_t)__builtin_bswap64(cpu64);
