[dpdk-dev] [PATCH v2 1/3] eal: correct OS headers in rte_byteorder.h

talshn at mellanox.com talshn at mellanox.com
Thu Jun 25 17:24:14 CEST 2020


From: Tal Shnaiderman <talshn at mellanox.com>

Inclusion of the endian.h header is set only for Linux OS.

Windows endlessness will be determined by the predefined
__BYTE_ORDER__ macro.

Signed-off-by: Tal Shnaiderman <talshn at mellanox.com>
---
 lib/librte_eal/include/generic/rte_byteorder.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/librte_eal/include/generic/rte_byteorder.h b/lib/librte_eal/include/generic/rte_byteorder.h
index 9ca960932f..a67e1d70d9 100644
--- a/lib/librte_eal/include/generic/rte_byteorder.h
+++ b/lib/librte_eal/include/generic/rte_byteorder.h
@@ -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
 
-- 
2.16.1.windows.4



More information about the dev mailing list