[dpdk-dev] [PATCH] examples/multi_process: fix compilation error on FreeBSD
David Marchand
david.marchand at redhat.com
Wed Jun 5 11:06:16 CEST 2019
Caught on FreeBSD 12:
/usr/include/netinet/ip.h:71:17: error: field 'ip_src' has incomplete type
struct in_addr ip_src,ip_dst; /* source and dest address */
^~~~~~
POSIX defines netinet/in.h as the right header for in_addr.
Linux seems fine without it but let's include it explicitly.
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
examples/multi_process/client_server_mp/mp_server/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/multi_process/client_server_mp/mp_server/main.c b/examples/multi_process/client_server_mp/mp_server/main.c
index 9a8e422..b1e8a8c 100644
--- a/examples/multi_process/client_server_mp/mp_server/main.c
+++ b/examples/multi_process/client_server_mp/mp_server/main.c
@@ -11,6 +11,7 @@
#include <inttypes.h>
#include <sys/queue.h>
#include <errno.h>
+#include <netinet/in.h>
#include <netinet/ip.h>
#include <signal.h>
--
1.8.3.1
More information about the dev
mailing list