From 4dbc3f093abf8e772ae84c3ccead34d36a91278b Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Fri, 23 Jan 2015 15:04:00 +0300 Subject: [PATCH] sockets: define NETLINK_SOCK_DIAG in sockets.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sockets.c: In function ‘preload_socket_modules’: sockets.c:153:36: error: ‘NETLINK_SOCK_DIAG’ undeclared (first use in this function) sockets.c:153:36: note: each undeclared identifier is reported only once for each function it appears in Reported-by: Mr Travis Signed-off-by: Andrey Vagin Signed-off-by: Pavel Emelyanov --- cr-check.c | 4 ---- include/sockets.h | 4 ++++ net.c | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/cr-check.c b/cr-check.c index 9afc9e83d..c31799871 100644 --- a/cr-check.c +++ b/cr-check.c @@ -94,10 +94,6 @@ static int check_map_files(void) return -1; } -#ifndef NETLINK_SOCK_DIAG -#define NETLINK_SOCK_DIAG NETLINK_INET_DIAG -#endif - static int check_sock_diag(void) { int ret; diff --git a/include/sockets.h b/include/sockets.h index 1acb64368..a3010e1d0 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -83,4 +83,8 @@ static inline int sk_decode_shutdown(int val) #define USK_EXT_PARAM "ext-unix-sk" +#ifndef NETLINK_SOCK_DIAG +#define NETLINK_SOCK_DIAG NETLINK_INET_DIAG +#endif + #endif /* __CR_SOCKETS_H__ */ diff --git a/net.c b/net.c index 015aeda90..ad314dfa5 100644 --- a/net.c +++ b/net.c @@ -26,10 +26,6 @@ #include "protobuf.h" #include "protobuf/netdev.pb-c.h" -#ifndef NETLINK_SOCK_DIAG -#define NETLINK_SOCK_DIAG NETLINK_INET_DIAG -#endif - static int ns_fd = -1; static int ns_sysfs_fd = -1;