summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Monjalon <thomas@monjalon.net>2019-11-06 13:09:43 +0100
committerDavid Marchand <david.marchand@redhat.com>2019-11-08 15:34:10 +0100
commit14cba9ee22685315da723bbd1212ba101a3a387f (patch)
tree5790d35b926a87d6037824eda9a3fe182a037495
parent7cc1bd4613a54dc71597b21b91837da2200b5d99 (diff)
downloaddpdk-14cba9ee22685315da723bbd1212ba101a3a387f.zip
dpdk-14cba9ee22685315da723bbd1212ba101a3a387f.tar.gz
dpdk-14cba9ee22685315da723bbd1212ba101a3a387f.tar.xz
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>
-rw-r--r--app/test-pmd/cmdline.c2
-rw-r--r--app/test/test_cmdline_ipaddr.c2
-rw-r--r--examples/cmdline/commands.c2
-rw-r--r--lib/librte_cmdline/cmdline_parse_ipaddr.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 4478069..74e02d6 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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>
diff --git a/app/test/test_cmdline_ipaddr.c b/app/test/test_cmdline_ipaddr.c
index 2d11ce9..315ac3a 100644
--- a/app/test/test_cmdline_ipaddr.c
+++ b/app/test/test_cmdline_ipaddr.c
@@ -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
diff --git a/examples/cmdline/commands.c b/examples/cmdline/commands.c
index 1249ee7..4badffc 100644
--- a/examples/cmdline/commands.c
+++ b/examples/cmdline/commands.c
@@ -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
diff --git a/lib/librte_cmdline/cmdline_parse_ipaddr.c b/lib/librte_cmdline/cmdline_parse_ipaddr.c
index 848c1eb..4de5ba3 100644
--- a/lib/librte_cmdline/cmdline_parse_ipaddr.c
+++ b/lib/librte_cmdline/cmdline_parse_ipaddr.c
@@ -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