[ I'm not on this list; please Cc followups to me. ]
When compiling the GRUB I checked out from CVS today, I get
errors about MAJOR not being defined in asmstub.c:
gcc -DHAVE_CONFIG_H -I. -I/home/kalle/src/FOREIGN-CVS/grub/grub -I..
-I/home/kalle/include -Wall -Wmissing-prototypes -Wunused -DGRUB_UTIL=1
-DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_MINIX=1 -fwritable-strings
-I/home/kalle/src/FOREIGN-CVS/grub/stage2 -I/home/kalle/src/FOREIGN-CVS/grub/stage1
-I/home/kalle/src/FOREIGN-CVS/grub/lib -O2 -g -Wall -W -c -o asmstub.o
/home/kalle/src/FOREIGN-CVS/grub/grub/asmstub.c
/home/kalle/src/FOREIGN-CVS/grub/grub/asmstub.c: In function `grub_stage2':
/home/kalle/src/FOREIGN-CVS/grub/grub/asmstub.c:196: warning: comparison between
signed and unsigned
/home/kalle/src/FOREIGN-CVS/grub/grub/asmstub.c: In function `check_device':
/home/kalle/src/FOREIGN-CVS/grub/grub/asmstub.c:534: warning: implicit declaration of
function `MAJOR'
/home/kalle/src/FOREIGN-CVS/grub/grub/asmstub.c: In function `assign_device_name':
/home/kalle/src/FOREIGN-CVS/grub/grub/asmstub.c:560: warning: comparison between
signed and unsigned
...
gcc -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 -DFSYS_MINIX=1
-fwritable-strings -I/home/kalle/src/FOREIGN-CVS/grub/stage2
-I/home/kalle/src/FOREIGN-CVS/grub/stage1 -I/home/kalle/src/FOREIGN-CVS/grub/lib -O2
-g -Wall -W -L/home/kalle/i386-pc-linux-gnu/lib -o grub main.o asmstub.o
../stage2/libgrub.a ../lib/libcommon.a -lncurses
asmstub.o: In function `check_device':
/home/kalle/src/FOREIGN-CVS/grub/grub/asmstub.c:533: undefined reference to `MAJOR'
collect2: ld returned 1 exit status
make: *** [grub] Error 1
This happens on i386-pc-linux-gnu, Debian libc6-dev_2.1.3-2,
Linux 2.2.14 (according to /usr/include/linux/version.h and
uname).
asmstub.c is revision 1.43; the last ChangeLog entry is:
> 2000-02-27 OKUJI Yoshinori <[EMAIL PROTECTED]>
>
> * docs/tutorial.texi (Network): New chapter.
By adding #include <linux/kdev_t.h>, the program compiles. But I
fear this isn't the right thing to do. The __dev_t shown by
glibc might be entirely different.
--- asmstub.c~ Fri Feb 25 06:58:22 2000
+++ asmstub.c Mon Feb 28 11:49:32 2000
@@ -44,6 +44,7 @@ int grub_stage2 (void);
# include <sys/ioctl.h> /* ioctl */
# include <linux/hdreg.h> /* HDIO_GETGEO */
# include <linux/major.h> /* FLOPPY_MAJOR */
+# include <linux/kdev_t.h> /* MAJOR */
# if (__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1))
/* Maybe libc doesn't have large file support. */
# include <linux/unistd.h> /* _llseek */