cmdline: replace FreeBSD ifdef for IP address parsing

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@monjalon.net>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
This commit is contained in:
Thomas Monjalon 2019-11-06 13:09:43 +01:00 committed by David Marchand
parent 7cc1bd4613
commit 14cba9ee22
4 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@
#include <termios.h>
#include <unistd.h>
#include <inttypes.h>
#ifdef __FreeBSD__
#ifdef RTE_EXEC_ENV_FREEBSD
#include <sys/socket.h>
#endif
#include <netinet/in.h>

View File

@ -6,7 +6,7 @@
#include <string.h>
#include <inttypes.h>
#include <netinet/in.h>
#ifdef __FreeBSD__
#ifdef RTE_EXEC_ENV_FREEBSD
#include <sys/socket.h>
#endif

View File

@ -12,7 +12,7 @@
#include <errno.h>
#include <netinet/in.h>
#include <termios.h>
#ifdef __FreeBSD__
#ifdef RTE_EXEC_ENV_FREEBSD
#include <sys/socket.h>
#endif

View File

@ -13,7 +13,7 @@
#include <errno.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#ifdef __FreeBSD__
#ifdef RTE_EXEC_ENV_FREEBSD
#include <sys/socket.h>
#endif