Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sock_diag: Arrange sock_diag.h such that it is exportable to userspace

Properly toss existing components around the ifdef __KERNEL__
and include the header into the header-y target.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Pavel Emelyanov and committed by
David S. Miller
e6fe2371 56be1788

+8 -3
+1
include/linux/Kbuild
··· 195 195 header-y += in.h 196 196 header-y += in6.h 197 197 header-y += in_route.h 198 + header-y += sock_diag.h 198 199 header-y += inet_diag.h 199 200 header-y += inotify.h 200 201 header-y += input.h
+7 -3
include/linux/sock_diag.h
··· 1 1 #ifndef __SOCK_DIAG_H__ 2 2 #define __SOCK_DIAG_H__ 3 3 4 - #define SOCK_DIAG_BY_FAMILY 20 4 + #include <linux/types.h> 5 5 6 - struct sk_buff; 7 - struct nlmsghdr; 6 + #define SOCK_DIAG_BY_FAMILY 20 8 7 9 8 struct sock_diag_req { 10 9 __u8 sdiag_family; 11 10 __u8 sdiag_protocol; 12 11 }; 12 + 13 + #ifdef __KERNEL__ 14 + struct sk_buff; 15 + struct nlmsghdr; 13 16 14 17 struct sock_diag_handler { 15 18 __u8 family; ··· 29 26 void sock_diag_save_cookie(void *sk, __u32 *cookie); 30 27 31 28 extern struct sock *sock_diag_nlsk; 29 + #endif /* KERNEL */ 32 30 #endif