Fix build on systems that lack NETLINK_SOCK_DIAG definition
NETLINK_INET_DIAG was introduced in linux v2.6.14, NETLINK_SOCK_DIAG was added much later in linux v3.3. * net.c [!NETLINK_SOCK_DIAG && NETLINK_INET_DIAG] (NETLINK_SOCK_DIAG): Define. * socketutils.c: Likewise. * tests/netlink_unix_diag.c: Likewise.
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
#include <linux/unix_diag.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
|
||||
#if !defined NETLINK_SOCK_DIAG && defined NETLINK_INET_DIAG
|
||||
# define NETLINK_SOCK_DIAG NETLINK_INET_DIAG
|
||||
#endif
|
||||
|
||||
#include <sys/un.h>
|
||||
#ifndef UNIX_PATH_MAX
|
||||
# define UNIX_PATH_MAX sizeof(((struct sockaddr_un *) 0)->sun_path)
|
||||
|
||||
Reference in New Issue
Block a user