Problem with include/linux/fs.h vs. glibc

From: Benjamin Herrenschmidt (
Date: Thu Oct 12 2000 - 10:00:49 EST

Hi !

Sorry if this have already been the cause of a flamewar on the list, but...

I need to compile an app with the 2.4 kernel headers & glibc (our stable
glibc on PPC is based on 2.1.3). However, the compiler is barking on a
change done in 2.4 version of include/linux/fs.h:

The 2.2.x version didn't include <linux/string.h> and all was fine.

The 2.4.x version does include <linux/string.h> and this is causing gcc
to bark because of conflicts with glibc headers (glibc seems to #define
some of the prototypes defined in linux/string.h, causing various parse

So what is the solution ?

 - removing the #include <linux/string.h> from linux/fs.h ?
 - moving it in a #ifdef __KERNEL__ part of the file ?
 - protect linux/string.h itself with #ifdef __KERNEL__ ?
 - fix glibc ? (how ? I mean, it's legal to include linux/fs.h from userland,
   but linux/string.h is obviously not meant to be exported out of the kernel)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:23 EST