Re: Linux Kernel include files

David Woodhouse
2007-06-29T12:59:39Z

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