Thread (24 messages) 24 messages, 7 authors, 2011-08-09

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

From: Michel Machado <hidden>
Date: 2011-08-07 22:14:31

quoted
   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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help