> -----Original Message-----
> From: Olivier Matz <olivier.m...@6wind.com>
> Sent: Monday, July 13, 2020 5:39 PM
> To: Fady Bader <f...@mellanox.com>
> Cc: dev@dpdk.org; Thomas Monjalon <tho...@monjalon.net>; Tasnim Bashar
> <tbas...@mellanox.com>; Tal Shnaiderman <tal...@mellanox.com>; Yohad Tor
> <yoh...@mellanox.com>; dmitry.kozl...@gmail.com;
> harini.ramakrish...@microsoft.com; ocard...@microsoft.com;
> pallavi.ka...@intel.com; ranjit.me...@intel.com
> Subject: Re: [PATCH v3 1/3] net: fix s_addr redefinition in Windows
> 
> Hi,
> 
> On Wed, Jul 08, 2020 at 11:25:23AM +0300, Fady Bader wrote:
> > s_addr in Windows is defined in windows.h so its
> 
> Is it windows.h, or is it winsock.h or winsock2.h instead?

S_addr is defined in winsock2.h which is included by windows.h.

> 
> > undefined in order to be defined as part of rte_ether_hdr.
> >
> > Signed-off-by: Fady Bader <f...@mellanox.com>
> > ---
> >  lib/librte_net/rte_ether.h | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
> > index 0ae4e75b6c..f6e37d9e5e 100644
> > --- a/lib/librte_net/rte_ether.h
> > +++ b/lib/librte_net/rte_ether.h
> > @@ -23,6 +23,15 @@ extern "C" {
> >  #include <rte_mbuf.h>
> >  #include <rte_byteorder.h>
> >
> > +/*
> > + * s_addr in windows is defined in windows.h
> > + * it is undefined here to be defined as part of rte_ether_hdr  */
> > +#ifdef RTE_EXEC_ENV_WINDOWS #undef s_addr #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. */
> > --
> > 2.16.1.windows.4
> >

Reply via email to