[dpdk-dev] [PATCH v8 3/4] net: work around s_addr macro on Windows
Olivier Matz
olivier.matz at 6wind.com
Thu Apr 8 13:26:00 CEST 2021
On Thu, Apr 08, 2021 at 01:22:48AM +0300, Dmitry Kozlyuk wrote:
> Windows Sockets headers contain `#define s_addr S_un.S_addr`, which
> conflicts with definition of `s_addr` field of `struct rte_ether_hdr`.
> Prieviously `s_addr` was undefined in <rte_ether.h>, which had been
> breaking access to `s_addr` field of `struct in_addr`, so some DPDK
> and Windows headers could not be included in one file.
>
> Renaming of `struct rte_ether_hdr` is planned:
> https://mails.dpdk.org/archives/dev/2021-March/201444.html
>
> Temporarily disable `s_addr` macro around `struct rte_ether_hdr`
> definition to avoid conflict. Place source MAC address in both `s_addr`
> and `S_un.S_addr` fields, so that access works either directly or
> through the macro as defined in Windows headers.
>
> Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk at gmail.com>
> Acked-by: Ranjit Menon <ranjit.menon at intel.com>
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
More information about the dev
mailing list