Re: Linux Kernel include files

From: David Woodhouse
Date: Fri Jun 29 2007 - 08:59:42 EST


On Thu, 2007-06-28 at 15:49 +0200, Jan Engelhardt wrote:
> I'll have to chime in here.
> Test program:
> #include <sys/socket.h>
> #include <sys/stat.h>
> #include <sys/types.h>
> #include <arpa/inet.h>
> #include <netinet/in.h>
> #include <errno.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <unistd.h>
> #include <linux/in.h> /* get IP_FREEBIND */
>
> Creates a lot of error messages.
> (Lots of redefinitions.)
>
> $ rpm -q linux-kernel-headers glibc
> linux-kernel-headers-2.6.21-7
> glibc-2.6-5
> (suse 10.3 factory)
>
> So looks like there's still something to do.

Hm, yes. But what? Is it reasonable for people to include <linux/in.h>
and <netinet/in.h> at the same time?

It's suboptimal that they have to include <linux/in.h> for certain
definitions, but that file also provides conflicting definitions of
stuff which exists elsewhere.

Should we split <linux/in.h> into two parts?

--
dwmw2

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/