On Wed, 2008-06-04 at 15:26 +0100, David Woodhouse wrote: > On Wed, 2008-06-04 at 17:23 +0300, Kirill A. Shutemov wrote: > > What do you think about hack like this: > > > > #include <linux/types.h> /* for __u* and __s* typedefs */ > > #if defined(__KERNEL__) || !defined(_SYS_SOCKET_H) > > #include <linux/socket.h> /* for "struct sockaddr" et al */ > > #endif > > #if defined(__KERNEL__) || !defined(_NET_IF_H) > > #include <linux/if.h> /* for IFNAMSIZ and co... */ > > #endif > > > > It avoids conflict between glibc's and kernel's headers if glibc's headers > > include first. > > Anything which is dependent on ordering just makes matters worse, imho. This kind of thing might work. It think it's fine as long as _some_ userspace header gets included first (which then includes <features.h> and thus defines __KERNEL_STRICT_NAMES. #ifndef __KERNEL__ #include <sys/socket.h> #endif #include <linux/types.h> #include <linux/socket.h> #include <linux/if.h> -- dwmw2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html