Problems compiling aboot-0.31 with 1.3.59

Dominik Kubla (dominik.kubla@uni-mainz.de)
Sat, 03 Feb 1996 12:50:36 +0100


Hello,

i was unable to compile aboot-0.31 until i made the following changes
to fs/ext2.c:

--- fs/ext2.c.orig Sat Feb 3 17:10:21 1996
+++ fs/ext2.c Sat Feb 3 17:11:40 1996
@@ -6,6 +6,7 @@
* This file has been ported from the DEC 32-bit Linux version
* by David Mosberger (davidm@cs.arizona.edu).
*/
+#define _LINUX_EXT2_FS_H
#include <linux/fs.h>
#include <linux/string.h>

@@ -14,6 +15,7 @@
#include "disklabel.h"
#include "utils.h"

+#undef _LINUX_EXT2_FS_H
#undef __KERNEL__
#include <linux/ext2_fs.h>

The problem is that somewhere in the include chain caused by <linux/fs.h>
the header is already included with __KERNEL__ defined ...
IMHO it is stupid to have header files include other header files. From
what i've heard the Bell Labs also recognised that, so that Plan-9 does not
allow/use that feature of C.

OTOH: The e2fs-utils provide a library to access the e2fs structures, why
don't you use it? Just wondering ...

Cheers,
Dominik