Re: Linux Kernel include files

Jan Engelhardt
2007-06-28T13:49:27Z

On Jun 27 2007 19:18, Sam Ravnborg wrote:
>
>For my test I used latest -git of the Linux kernel.
>In this version the include of ext2_fs_bh.h is guarded
>by __KERNEL__ like this:
>
>#ifdef __KERNEL__
>#include <linux/ext2_fs_sb.h>
>static inline struct ext2_sb_info *EXT2_SB(struct super_block *sb)
>{
> return sb->s_fs_info;
>}
[...]

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.

Jan
--