[syslinux] (no subject)
H. Peter Anvin
hpa at zytor.com
Mon Jan 3 06:55:36 PST 2005
gabriele balducci wrote:
> fails with:
> gcc -Wp,-MT,extlinux.o,-MMD,.extlinux.o.d -W -Wall -Wno-sign-compare -D_FILE_OFFSET_BITS=64 -g -Os -I. -I.. -I../libfat -c -o extlinux.o extlinux.c
> extlinux.c: In function `get_size':
> extlinux.c:285: error: `BLKGETSIZE64' undeclared (first use in this function)
> extlinux.c:285: error: (Each undeclared identifier is reported only once
> extlinux.c:285: error: for each function it appears in.)
> make: *** [extlinux.o] Error 1
> make: Leaving directory `/home/balducci/tmp/install-us-d/syslinux/syslinux-3.01/extlinux'
> As a matter of fact, I can't grep any BLKGETSIZE64 declaration under my
> /usr/include directory tree.
> I guess this is due to the fact that my installed kernel headers are
> quite old (redhat-7.1, kernel 2.4.2).
You're absolutely right. The problem is that your glibc and associated
headers are way too old. You have quite an antique there.
> However, I keep my kernel up2date: I'm running kernel-2.6.10.
> In order to make syslinux use the 2.6.10 headers, I unpack and configure
> a kernel-2.6.10 tree. Then, I try to build with:
> export C_INCLUDE_PATH
> make depend
> make installer
This doesn't work with 2.6 kernels. You're supposed to use the
kernel-derived headers that come with glibc, not the ones shipped with
the kernel. Personally I think this methodology is flawed, but that's
the way it is.
> I seem to understand that the 2.6.10 headers are actually used, but
> something is going wrong any way. Trying to satisfy the use of
> GFP_KERNEL by including gfp.h (which contains the declaration) in
> extlinux.c produces other errors which I did not try to dig into.
Your best bet is to add:
#define BLKGETSIZE64 _IOR(0x12,114,size_t)
More information about the Syslinux