[dpdk-dev] [PATCH] cmdline: replace FreeBSD ifdef for IP address parsing

Thomas Monjalon thomas at monjalon.net
Fri Nov 8 17:28:46 CET 2019


08/11/2019 17:15, Stephen Hemminger:
> On Wed,  6 Nov 2019 13:09:43 +0100
> Thomas Monjalon <thomas at monjalon.net> wrote:
> 
> > The constants like AF_INET are in sys/socket.h in FreeBSD.
> > The #ifdef macro __FreeBSD__ is replaced with RTE_EXEC_ENV_FREEBSD
> > in order to be consistent across DPDK files, and allow to grep
> > for EXEC_ENV among other benefits.
> > 
> > Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> > ---
> > -#ifdef __FreeBSD__
> > +#ifdef RTE_EXEC_ENV_FREEBSD
> >  #include <sys/socket.h>
> >  #endif
> 
> Why not always include sys/socket.h having an extra include
> is much less of a nuisance than a silly #ifdef.

Yes, good suggestion.

David already merged the patch.
Do you want to propose a patch on top?




More information about the dev mailing list