From: Andrew Morton Second attempt: net/core/sock.c: In function 'sock_init_data': net/core/sock.c:1496: warning: implicit declaration of function 'kevent_sk_reinit' Cc: Evgeniy Polyakov Cc: Michael Kerrisk Cc: "David S. Miller" Cc: Ulrich Drepper Signed-off-by: Andrew Morton --- include/linux/kevent.h | 9 +++++---- net/core/sock.c | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff -puN net/core/sock.c~kevent-socket-notifications-fix-4 net/core/sock.c --- a/net/core/sock.c~kevent-socket-notifications-fix-4 +++ a/net/core/sock.c @@ -111,6 +111,7 @@ #include #include #include +#include #include #include diff -puN include/linux/kevent.h~kevent-socket-notifications-fix-4 include/linux/kevent.h --- a/include/linux/kevent.h~kevent-socket-notifications-fix-4 +++ a/include/linux/kevent.h @@ -169,8 +169,7 @@ static inline void kevent_stat_total(str #define kevent_stat_total(u) ({ (void) u;}) #endif -#ifdef CONFIG_KEVENT_SOCKET -#ifdef CONFIG_LOCKDEP +#if defined(CONFIG_LOCKDEP) && defined(CONFIG_KEVENT_SOCKET) void kevent_socket_reinit(struct socket *sock); void kevent_sk_reinit(struct sock *sk); #else @@ -181,15 +180,17 @@ static inline void kevent_sk_reinit(stru { } #endif + +#ifdef CONFIG_KEVENT_SOCKET void kevent_socket_notify(struct sock *sock, u32 event); int kevent_socket_dequeue(struct kevent *k); int kevent_socket_enqueue(struct kevent *k); #define sock_async(__sk) sock_flag(__sk, SOCK_ASYNC) -#else +#else /* CONFIG_KEVENT_SOCKET */ static inline void kevent_socket_notify(struct sock *sock, u32 event) { } #define sock_async(__sk) ({ (void)__sk; 0; }) -#endif +#endif /* CONFIG_KEVENT_SOCKET */ #endif /* __KEVENT_H */ _