ext2fs headers problem

Cristian Gafton gafton@redhat.com
Thu Apr 30 09:13:00 GMT 1998


Okay, glibc 2.0.7, ext2 1.10, kernel 2.0.33

The following program does not compile:

--------------------------
#include <ext2fs/ext2fs.h>
#include <linux/ext2_fs.h>

static __u32 test;

void main(void) { test = 0;}
--------------------------

No matter the order you put the header files, you get compile errors
because of the header breakage.

So:

a. how can one compile a program that needs <ext2fs/ext2fs.h> ? Including
<linux/*.h> in a program is kind of a nasty hack, even if ext2fs is waay
too linux-specific to care about portability issues.

b. Lots of headers still need __u32 types. those can be obtained only by
including <linux/types.h>, which no wonder, conflicts a lot with
<sys/types.h> that is included by most of the other header files.

Cristian
--
----------------------------------------------------------------------
Cristian Gafton   --   gafton@redhat.com   --   Red Hat Software, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 UNIX is user friendly. It's just selective about who its friends are.




More information about the Libc-hacker mailing list