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 <fady@mellanox.com> Acked-by: Ranjit Menon <ranjit.menon@intel.com> Tested-by: Pallavi Kadam <pallavi.kadam@intel.com> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
This commit is contained in:
parent
a4235b781f
commit
507e1ca07b
@ -23,6 +23,10 @@ extern "C" {
|
||||
#include <rte_mbuf.h>
|
||||
#include <rte_byteorder.h>
|
||||
|
||||
#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. */
|
||||
|
Loading…
Reference in New Issue
Block a user