]> git.baikalelectronics.ru Git - kernel.git/commit
net: Support inclusion of <linux/socket.h> before <sys/socket.h>
authorBen Hutchings <ben@decadent.org.uk>
Mon, 5 Oct 2009 07:24:36 +0000 (00:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Oct 2009 07:24:36 +0000 (00:24 -0700)
commit169bfd56e2f25bb096b002a3d89b9b4020d3f617
tree259b81d36f276f952ef6df08fe2d4500bb62d972
parent15962017a571648514f67ec13acafdb8ee953039
net: Support inclusion of <linux/socket.h> before <sys/socket.h>

The following user-space program fails to compile:

    #include <linux/socket.h>
    #include <sys/socket.h>
    int main() { return 0; }

The reason is that <linux/socket.h> tests __GLIBC__ to decide whether it
should define various structures and macros that are now defined for
user-space by <sys/socket.h>, but __GLIBC__ is not defined if no libc
headers have yet been included.

It seems safe to drop support for libc 5 now.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Bastian Blank <waldi@debian.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/socket.h