cmdline: replace FreeBSD ifdef for IP address parsing
authorThomas Monjalon <thomas@monjalon.net>
Wed, 6 Nov 2019 12:09:43 +0000 (13:09 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 8 Nov 2019 14:34:10 +0000 (15:34 +0100)
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>
app/test-pmd/cmdline.c
app/test/test_cmdline_ipaddr.c
examples/cmdline/commands.c
lib/librte_cmdline/cmdline_parse_ipaddr.c

index 4478069..74e02d6 100644 (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>
index 2d11ce9..315ac3a 100644 (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
 
index 1249ee7..4badffc 100644 (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
 
index 848c1eb..4de5ba3 100644 (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