eal: support endianness detection on Windows
authorTal Shnaiderman <talshn@mellanox.com>
Thu, 25 Jun 2020 15:24:14 +0000 (18:24 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 6 Jul 2020 23:42:27 +0000 (01:42 +0200)
Inclusion of the endian.h header is set only for Linux OS.

Windows endianness will be determined by the predefined
__BYTE_ORDER__ macro.

Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
lib/librte_eal/include/generic/rte_byteorder.h

index 9ca9609..a67e1d7 100644 (file)
@@ -17,7 +17,7 @@
 #include <stdint.h>
 #ifdef RTE_EXEC_ENV_FREEBSD
 #include <sys/endian.h>
-#else
+#elif defined RTE_EXEC_ENV_LINUX
 #include <endian.h>
 #endif