From: Fady Bader Date: Thu, 23 Jul 2020 07:08:23 +0000 (+0300) Subject: net: fix redefinition in Windows X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=507e1ca07bee3c78c4da1262c4c00668d7a1f8ec;p=dpdk.git net: fix redefinition in Windows In Windows, s_addr is defined in winsock2.h which is included by windows.h. It is undefined in order to be defined as part of rte_ether_hdr. Signed-off-by: Fady Bader Acked-by: Ranjit Menon Tested-by: Pallavi Kadam Signed-off-by: Thomas Monjalon --- diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h index a358e88763..a9c6925f8d 100644 --- a/lib/librte_net/rte_ether.h +++ b/lib/librte_net/rte_ether.h @@ -23,6 +23,10 @@ extern "C" { #include #include +#ifdef RTE_EXEC_ENV_WINDOWS /* Workaround conflict with rte_ether_hdr. */ +#undef s_addr /* Defined in winsock2.h included in windows.h. */ +#endif + #define RTE_ETHER_ADDR_LEN 6 /**< Length of Ethernet address. */ #define RTE_ETHER_TYPE_LEN 2 /**< Length of Ethernet type field. */ #define RTE_ETHER_CRC_LEN 4 /**< Length of Ethernet CRC. */