[PATCH] sys/kd.h should undefine _LINUX_TYPES_H if it set it.
Nix
nix@esperi.org.uk
Wed Mar 9 16:08:00 GMT 2005
On Mon, 07 Mar 2005, Jeremy Huddleston yowled:
> With linux-2.6.10 headers and glibc-2.3.4, the following code will fail:
> #include <sys/kd.h>
> #include <linux/byteorder/big_endian.h>
> int main() {
> return 0;
> }
>
> This is because linux/byteorder/big_endian.h needs linux/types.h for
> __le64, but sys/kd.h defines _LINUX_TYPES_H which prevents it from being
> included. This patch remedies the problem the same way sys/sysctl.h
> handles it.
A set of kernel headers intended to be usable for userspace and glibc
compilation is being maintained by Mariusz Mazur <mmazur@kernel.pl>: see
<http://ep09.pld-linux.org/~mmazur/linux-libc-headers/>. The headers
shipped with the kernel aren't meant to be included by userspace
programs.
This incompatibility is already fixed in these headers.
In general, if you have libc/kernel-header userspace problems, the
place to fix them is in the linux-libc-headers: don't hack up glibc
or the kernel headers proper for such things.
--
> ...Hires Root Beer...
What we need these days is a stable, fast, anti-aliased root beer
with dynamic shading. Not that you can let just anybody have root.
--- John M. Ford
More information about the Libc-alpha
mailing list