DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] examples/bond: fix bsd compile error
Date: Wed, 25 Nov 2015 17:41:04 +0000	[thread overview]
Message-ID: <1448473264-20907-1-git-send-email-ferruh.yigit@intel.com> (raw)
In-Reply-To: <1448473001-19725-1-git-send-email-ferruh.yigit@intel.com>

Error:
== bond
  CC main.o
/.../examples/bond/main.c:431:24: error: use of undeclared identifier 'AF_INET'
        if (res->ip.family == AF_INET)
                              ^
1 error generated.
/.../mk/internal/rte.compile-pre.mk:126: recipe for target 'main.o' failed

AF_INET defined in sys/socket.h

This header included for Linux:
. /<snip>/include/rte_ip.h
.. /usr/include/netinet/in.h
... /usr/include/sys/socket.h

But not for FreeBSD:
. /<snip>/include/rte_ip.h
.. /usr/include/netinet/in.h
... /usr/include/machine/endian.h
... /usr/include/netinet6/in6.h
. /<snip>/include/rte_tcp.h

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 examples/bond/main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/bond/main.c b/examples/bond/main.c
index 4622283..19f4f05 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -45,6 +45,7 @@
 #include <termios.h>
 #include <unistd.h>
 #include <pthread.h>
+#include <sys/socket.h>
 
 #include <rte_common.h>
 #include <rte_log.h>
-- 
2.5.0

  reply	other threads:[~2015-11-25 17:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 17:36 [dpdk-dev] [PATCH] " Ferruh Yigit
2015-11-25 17:41 ` Ferruh Yigit [this message]
2015-11-26  9:52   ` [dpdk-dev] [PATCH v2] " Mrzyglod, DanielX T
2015-12-02 10:55     ` Yigit, Ferruh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1448473264-20907-1-git-send-email-ferruh.yigit@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).