[klibc] [patch 11/12] Unpleasantness in linux/nfs_mount.h
H. Peter Anvin
hpa at zytor.com
Tue May 24 22:46:05 PDT 2005
Erik van Konijnenburg wrote:
> There is a conflict in glibc between <linux/in.h> and <netinet/in.h>:
> one defines protocols with an enum, the other does the same,
> but adds a self-define for every enumerated value.
> #define IPPROTO_IP IPPROTO_IP
>
> This means the two cannot be mixed, and since loads of include files
> refer to <netinet/in.h>, effectively <linux/in.h> cannot be used
> with glibc.
>
> Since <linux/nfs_mount.h> uses <linux/in.h>, that also is off-limits
> for anything that wants to be compatible with glibc.
>
> This uses the same workaround used by util-linux: just copy
> the relevant declarations. Ugly, but it's not like people
> are going to change the NFS mount interface from under us
> without warning.
>
>
> /*
> * nfsmount/nfsmount.h
> + *
> + * We inline the contents of linux/nfs_mount.h, minus
> + * the include of linux/in.h, because of style conflicts
> + * between netinet/in.h and linux/in.h.
> + * Inlined stuff is Copyright (C) 1992 Rick Sladkey
> + */
> +
What are the copyright terms for this file?
-hpa
More information about the klibc
mailing list