netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Compilation issues using netlink.h
@ 2009-12-28  0:32 Matthew Burgess
  2010-01-05  2:32 ` Ben Hutchings
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Burgess @ 2009-12-28  0:32 UTC (permalink / raw)
  To: netdev; +Cc: davem, ben, linux-kernel

Hi,

The test case below simplifies a failure I see when trying to compile 
strace using kernel headers from Linux-2.6.32.2:

#include <linux/netlink.h>
struct sockaddr_nl nl;
int main() {
   return 0;
}

$ gcc -o test test.c
In file included from test.c:1:
/usr/include/linux/netlink.h:34: error: expected 
specifier-qualifier-list before 'sa_family_t'

The comment in netlink.h suggests that 'sa_family_t' is expected to be 
found in linux/socket.h, but since commit 9c501935a3 ("net: Support 
inclusion of <linux/socket.h> before <sys/socket.h>") that appears to 
not be true anymore, it's now in sys/socket.h.  Sure enough, if I change 
the include in netlink.h to pull in sys/socket.h instead of 
linux/socket.h, that enables the test case (and strace) to compile 
again, but I wasn't sure if it was really the right thing to do.

Thanks,

Matt.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-05  2:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-28  0:32 Compilation issues using netlink.h Matthew Burgess
2010-01-05  2:32 ` Ben Hutchings

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).