Linux 2.4-test9 kernel header flaw

From: Jack Howarth (howarth@bromo.med.uc.edu)
Date: Thu Sep 28 2000 - 17:41:41 EST


Hello,
    In building the RedHat 7.0 srpm for gnome-utils on linuxppc
using glibc 2.1.94 and the Linux 2.4-test9 kernel I believe
I have uncovered a flaw in the linux/fs.h header. Unless I
apply a patch like below to linux/fs.h...

--- fs.h.org Thu Sep 28 18:32:55 2000
+++ fs.h Thu Sep 28 18:33:08 2000
@@ -20,7 +20,6 @@
 #include <linux/stat.h>
 #include <linux/cache.h>
 #include <linux/stddef.h>
-#include <linux/string.h>
 
 #include <asm/atomic.h>
 #include <asm/bitops.h>

I find that the compile of gnome-utils fails as follows...

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl -DGLADEDIR=\""/usr/share/gfloppy/glade"\" -I/usr/include -DNEED_GNOMESUPPORT_H -I/usr/lib/gnome-libs/include -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/l
 In file included from /usr/include/linux/string.h:21,
                  from /usr/include/linux/fs.h:23,
                 from badblocks.c:43:

this is because in the absence of ifdef __KERNEL__ wrapper on linux/string.h the
following conflict occurs between

extern int strncasecmp(const char *, const char *, int);

from /usr/include/asm/string.h and

extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
     __THROW __attribute_pure__;

from /usr/include/string.h.
This include for linux/string.h is not present in linux 2.2.x's linux/fs.h.
Also removing it has no impact on compiling kernels in Linux 2.4-test9.
Franz Sirl and myself can find no use for it in the linux/fs.h header.
                    Thanks in advance for addressing this flaw.
                                           Jack Howarth

------------------------------------------------------------------
-- Versions installed: (if some fields are empty or look
-- unusual then possibly you have very old versions)
Linux localhost.localdomain 2.4.0-test9 #16 Wed Sep 27 18:32:57 EDT 2000 ppc unknown
Kernel modules 2.3.15
Gnu C 2.95.3
Gnu Make 3.79.1
Binutils 2.10.0.26
Linux C Library 2.1.94
Dynamic linker ldd (GNU libc) 2.1.94
Procps 2.0.7
Mount 2.10m
Net-tools 1.56
Console-tools 0.3.3
Sh-utils 2.0
Modules Loaded
----------------------------------------------------------------------

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



This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:23 EST