[syslinux] SYSLINUX 3.61 released
H. Peter Anvin
hpa at zytor.com
Mon Feb 4 14:01:29 PST 2008
Jeffrey Hutzelman wrote:
>>>
>> That would be a bug in those distros... <sys/vfs.h> *is* the correct
>> header for statfs().
>
> I don't think it's fair to call it a bug in the distro. The problem is
> that in 2.4, <linux/fs.h> pulls in quite a large number of other headers,
> including ultimately <asm/statfs.h> where the kernel's struct statfs is
> defined. I can't see a clean way to fix this, though perhaps it would work
> to redefine 'statfs' to something else just long enough to pull in
> <linux/fs.h>, and then put it back. Something like...
Well, it is, because in 2.4 you were not supposed to have Linux kernel
headers under /usr/include/linux and /usr/include/asm. This of course
was an unrealistic policy, but it was.
> +#define statfs stupid_kernel_statfs
> #include <linux/fs.h>
> +#undef statfs
This probably is a better workaround. I'm not sure I want to put it in
the mainstream sources, but for wrapping up ancient-distro packages,
it's a good patch.
-hpa
More information about the Syslinux
mailing list