Re: Header files and interfaces

Olaf Titz (olaf@bigred.inka.de)
Wed, 24 Jun 1998 10:28:06 +0200


> As the time passes, the kernel evolves and new ioctls appear. But it's still
> a good idea to compile programs for older kernels (e.g., for stable ones)
> without having to override which ioctls/sockopts/whatever are supported
> by the target system. So it would be better to separate the kernel includes
> from glibc includes and release them as a separate package and just choose
> the right one when compiling stuff.

You mean stuff like the following:

"arp" from the net-tools package (or rather an include file in this
package) contains #ifdefs on ioctl numbers defined in
<linux/sockios.h>, on the assumption that it will be picked up by
including <sys/socket.h>. If you compile this on libc6, the ioctl in
question will be undefined and another one, apparently obsolete since
the 1.1 days, is used which doesn't work right (in case you're
curious: it ignores the interface option).

It took me an hour yesterday to find this error when I tried to help a
friend configure his proxy ARP, half of that was the time it took me
to find out that /sbin/arp on Red Hat 5.x (x=?) is indeed broken and
confusion on my part about the command line parameters was _not_ the
cause.

This kind of errors is what frustrates me about the libc 6 headers
complete breakage, as they tend to show up all over the place.
Wonder how many programs not matching the kernel are still in RH and
other packages just because of kernel header separation.

The obvious answer - "net-tools is broken" - isn't the whole truth
because before libc6 started messing it all up, you could reasonably
expect that you did indeed get the kernel definitions on including
<sys/*> stuff, and including <linux/*> directly from user programs has
always been discouraged. Net result: libc6 changed the whole API.

olaf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu