Hack to solve HAL compilation problems



I had a problem compiling HAL from the bootstrap directory:

| linux/block_class_device.c: In function `volume_set_size':
| linux/block_class_device.c:603: error: `u64' undeclared (first use in this function)

This was briefly mentioned here about two weeks ago, but as far as I
could see, no easy solution came up.
I'm still running a 2.4 kernel on my desktop, and as the HAL docs
mention it's primarily being developed for the 2.6 series, I checked the
2.6.8 headers and noticed the BLKGETSIZE64 has been changed from
#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64))
which causes the above problem by using the kernel-internal u64
definition to
#define BLKGETSIZE64 _IOR(0x12,114,size_t)
Now, I'm a bit puzzled about the working of this...I thought I was
fairly proficient in C but I've never seen a type name used in place of
a sizeof expression. However, fixing this which is IMHO clearly a bug in
the 2.4 headers, solves the problem with HAL. It still failed to build
the docbook docs here, but as I don't give a damn about these, I'm fine
with it.
I realize partially changing your kernel headers is not a very clean way
of fixing things, but I don't think updating this macro will hurt
anything.

cheers
	Matthias

Attachment: pgpPLY2GmmWzD.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]