netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@inai.de>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH 1/2] build: resolve build failure involving linux/netlink.h
Date: Tue, 21 Jan 2014 00:52:01 +0100	[thread overview]
Message-ID: <1390261922-13182-2-git-send-email-jengelh@inai.de> (raw)
In-Reply-To: <1390261922-13182-1-git-send-email-jengelh@inai.de>

This was seen with a sufficiently-old /usr/include/linux
(from Linux 2.6.32).

	In file included from common.c:10:
	/usr/include/linux/netlink.h:34: error: expected
	specifier-qualifier-list before 'sa_family_t'

The solution is to include <linux/*> last of all system headers.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
 src/common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/common.c b/src/common.c
index b9598bf..336d2b4 100644
--- a/src/common.c
+++ b/src/common.c
@@ -7,6 +7,8 @@
  * (at your option) any later version.
  */
 
+#include <stdlib.h>
+#include <sys/socket.h>
 #include <linux/netlink.h>
 #include <linux/netfilter/nfnetlink.h>
 
@@ -14,7 +16,6 @@
 #include <libnftnl/common.h>
 
 #include "internal.h"
-#include<stdlib.h>
 
 struct nlmsghdr *nft_nlmsg_build_hdr(char *buf, uint16_t cmd, uint16_t family,
 				     uint16_t type, uint32_t seq)
-- 
1.8.4


  reply	other threads:[~2014-01-20 23:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-20 23:52 libnftnl: two trivial build fixes Jan Engelhardt
2014-01-20 23:52 ` Jan Engelhardt [this message]
2014-01-21 12:25   ` [PATCH 1/2] build: resolve build failure involving linux/netlink.h Pablo Neira Ayuso
2014-01-20 23:52 ` [PATCH 2/2] build: resolve compile error involving XT_EXTENSION_MAXNAMELEN Jan Engelhardt

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=1390261922-13182-2-git-send-email-jengelh@inai.de \
    --to=jengelh@inai.de \
    --cc=netfilter-devel@vger.kernel.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).