[syslinux] Re: Problem compiling syslinux-3.01

Terry Chan tpchan at comcast.net
Tue Jan 4 21:28:54 PST 2005

On Tue, Jan 04, 2005 at 06:50:53PM -0800, H. Peter Anvin wrote:
> Okay, your <linux/fs.h> is broken beyond repair.  The proper definition 
> of BLKGETSIZE64 is:
> #define BLKGETSIZE64 _IOR(0x12,114,size_t)
> There is no "sizeof", and u64 doesn't belong in the user headers.  I 
> suspect this particular screwup is probably the reason that it's size_t         
> instead of the proper __u64 in the current definition, because sizeof() 
> returns a size_t, so by putting sizeof(u64) they basically did 
> sizeof(sizeof(u64)), which is equivalent to sizeof(size_t) if u64 is 
> defined.
> This is way ugly.  The best bet is to add right after
>  #include <inttypes.h>
> +typedef uint64_t u64;
> ... and see if that helps.
> Barf, puke.
>       -hpa

Peter your fix does, indeed, allow extlinux/extlinux.c to correctly compile on
my linux box.

I do wish to point out that from the unmodified tarball for linux-2.4.28.tar.bz2,
( available from http://www.kernel.org/pub/linux/kernel/v2.4/ ) that in the
file include/linux/fs.h at line 192 you'll find:

#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in bytes (u64 *arg) */

As a lowly linux distro worker/volunteer, how should I go about fixing this problem?
Email the kernel people and tell them their code is ugly ?  :-)  Any other ideas?

Terry Chan

More information about the Syslinux mailing list