Subject: Re: include/linux/netlink.h: problem when included by an application

From: Michel Machado <[email-masked]>
Date: Sun, 07 Aug 2011 18:14:23 -0400

> >    The simplest solution that I came up was replacing sa_family_t in
> > include/linux/netlink.h to 'unsigned short' as header
> > include/linux/socket.h does for struct __kernel_sockaddr_storage
> > available to applications.
> 
> Maybe we should do something like this in <linux/socket.h>:
> 
> typedef unsigned short __kernel_sa_family_t;
> #ifdef __KERNEL__
> typedef __kernel_sa_family_t sa_family_t;
> #endif
> 
> and then use __kernel_sa_family_t in <linux/netlink.h>.
> 
> Ben.

   I like this solution, it solves both struct __kernel_sockaddr_storage
in include/linux/socket.h, and struct sockaddr_nl in
include/linux/netlink.h.

[ ]'s
Michel Machado