cmdline: remove unnecessary #ifdef
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 8 Nov 2019 18:00:35 +0000 (10:00 -0800)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 12 Nov 2019 17:35:17 +0000 (18:35 +0100)
The #ifdef to conditionally include <sys/socket.h> on BSD
is unnecessary. It is harmless to include the header on other
OS's. An extra include is better than an #ifdef.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
app/test-pmd/cmdline.c
app/test/test_cmdline_ipaddr.c
lib/librte_cmdline/cmdline_parse_ipaddr.c

index 7d48fed..809c94a 100644 (file)
@@ -11,9 +11,7 @@
 #include <termios.h>
 #include <unistd.h>
 #include <inttypes.h>
-#ifdef RTE_EXEC_ENV_FREEBSD
 #include <sys/socket.h>
-#endif
 #include <netinet/in.h>
 
 #include <sys/queue.h>
index 315ac3a..088cd5a 100644 (file)
@@ -6,9 +6,7 @@
 #include <string.h>
 #include <inttypes.h>
 #include <netinet/in.h>
-#ifdef RTE_EXEC_ENV_FREEBSD
 #include <sys/socket.h>
-#endif
 
 #include <rte_string_fns.h>
 
index 4de5ba3..f8dbdf2 100644 (file)
@@ -13,9 +13,7 @@
 #include <errno.h>
 #include <arpa/inet.h>
 #include <netinet/in.h>
-#ifdef RTE_EXEC_ENV_FREEBSD
 #include <sys/socket.h>
-#endif
 
 #include <rte_string_fns.h>