Re: 2.0.x and glibc-2.0 collisions...

Michael Alan Dorman (mdorman@calder.med.miami.edu)
30 May 1997 09:16:29 -0400


Michael Poole <poole+@andrew.cmu.edu> writes:
> One of the best ways I've seen to handle this is to #define
> __STRICT_KERNEL_NAMES at the start of each source file; this keeps most of
> the name collisions from happening. However, #include <linux/socket.h>
> causes a hard conflict on (I believe) all the data types at the start of
> the file.

Try inserting this before <sys/socket.h> is included:

#if defined(__GLIBC__)
#define _SOCKETBITS_H
#endif /* __GLIBC__ */

I've not done this on the specific piece of code you reference, but
I've compiled an awful lot of other networking code and it all works
OK (well, there's some alignment issues, as I'm on an Alpha, but other
than that...).

Mike.