[v2,1/6] examples/l3fwd: fix compile on FreeBSD

Message ID 20190426165043.17268-2-bruce.richardson@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series add testing of libdpdk pkg-config file |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Bruce Richardson April 26, 2019, 4:50 p.m. UTC
  On freebsd we need to include sys/socket.h to get the definition of
AF_INET in order to compile.

Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for printing")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/l3fwd/l3fwd_lpm.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Luca Boccassi May 1, 2019, 10:10 a.m. UTC | #1
On Fri, 2019-04-26 at 17:50 +0100, Bruce Richardson wrote:
> On freebsd we need to include sys/socket.h to get the definition of
> AF_INET in order to compile.
> 
> Fixes: d5ceea4ab160 ("examples/l3fwd: format IP addresses for
> printing")
> 
> Signed-off-by: Bruce Richardson <
> bruce.richardson@intel.com
> >
> ---
>  examples/l3fwd/l3fwd_lpm.c | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Luca Boccassi <bluca@debian.org>
  

Patch

diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 172a036b2..60a00639e 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -13,6 +13,7 @@ 
 #include <errno.h>
 #include <getopt.h>
 #include <stdbool.h>
+#include <sys/socket.h>
 #include <arpa/inet.h>
 
 #include <rte_debug.h>