DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] cmdline: replace FreeBSD ifdef for IP address parsing
@ 2019-11-06 12:09 Thomas Monjalon
  2019-11-06 12:11 ` Burakov, Anatoly
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Thomas Monjalon @ 2019-11-06 12:09 UTC (permalink / raw)
  To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger, Olivier Matz; +Cc: dev

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>
---
 app/test-pmd/cmdline.c                    | 2 +-
 app/test/test_cmdline_ipaddr.c            | 2 +-
 examples/cmdline/commands.c               | 2 +-
 lib/librte_cmdline/cmdline_parse_ipaddr.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 4478069911..74e02d6813 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 2d11ce936c..315ac3a9f8 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 1249ee7a8a..4badffc257 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 848c1eb07d..4de5ba35ae 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
 
-- 
2.23.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-11-12 19:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 12:09 [dpdk-dev] [PATCH] cmdline: replace FreeBSD ifdef for IP address parsing Thomas Monjalon
2019-11-06 12:11 ` Burakov, Anatoly
2019-11-08  8:44 ` Olivier Matz
2019-11-08 10:18   ` David Marchand
2019-11-08 16:15 ` Stephen Hemminger
2019-11-08 16:28   ` Thomas Monjalon
2019-11-08 18:00 ` [dpdk-dev] [PATCH] cmdline: remove unnecessary #ifdef Stephen Hemminger
2019-11-11 10:41   ` Bruce Richardson
2019-11-12  8:10   ` Olivier Matz
2019-11-12 19:14     ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).