[dpdk-dev] app/testpmd: fix flow command compilation errors

Message ID 1482508376-15171-1-git-send-email-adrien.mazarguil@6wind.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Adrien Mazarguil Dec. 23, 2016, 3:52 p.m. UTC
  A missing include causes the following compilation errors:

 error: use of undeclared identifier 'AF_INET'
 error: use of undeclared identifier 'AF_INET6'

Fixes: ef6e38550f07 ("app/testpmd: add items ipv4/ipv6 to flow command")

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
 app/test-pmd/cmdline_flow.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Thomas Monjalon Dec. 23, 2016, 3:58 p.m. UTC | #1
2016-12-23 16:52, Adrien Mazarguil:
> A missing include causes the following compilation errors:
> 
>  error: use of undeclared identifier 'AF_INET'
>  error: use of undeclared identifier 'AF_INET6'
> 
> Fixes: ef6e38550f07 ("app/testpmd: add items ipv4/ipv6 to flow command")
> 
> Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

As this error happens only on BSD, I've reworded the title:
	app/testpmd: fix flow command build on FreeBSD

Applied, thanks
  

Patch

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 7760c2d..ff98690 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -39,6 +39,7 @@ 
 #include <ctype.h>
 #include <string.h>
 #include <arpa/inet.h>
+#include <sys/socket.h>
 
 #include <rte_common.h>
 #include <rte_ethdev.h>