netlink: provide a fallback definition of NETLINK_SOCK_DIAG
Add a fallback definition of NETLINK_SOCK_DIAG to netlink.h instead of adding these fallback definitions to every file. * netlink.h: Provide a fallback definition of NETLINK_SOCK_DIAG. * socketutils.c: Include "netlink.h" instead of <linux/netlink.h>, remove fallback definition of NETLINK_SOCK_DIAG.
This commit is contained in:
parent
4ec744efce
commit
fd68eabd59
@ -32,6 +32,10 @@
|
||||
#include <sys/socket.h>
|
||||
#include <linux/netlink.h>
|
||||
|
||||
#ifndef NETLINK_SOCK_DIAG
|
||||
# define NETLINK_SOCK_DIAG 4
|
||||
#endif
|
||||
|
||||
#undef NLMSG_HDRLEN
|
||||
#define NLMSG_HDRLEN ((unsigned int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <linux/netlink.h>
|
||||
#include "netlink.h"
|
||||
#include <linux/sock_diag.h>
|
||||
#include <linux/inet_diag.h>
|
||||
#include <linux/unix_diag.h>
|
||||
@ -46,10 +46,6 @@
|
||||
# define UNIX_PATH_MAX sizeof(((struct sockaddr_un *) 0)->sun_path)
|
||||
#endif
|
||||
|
||||
#ifndef NETLINK_SOCK_DIAG
|
||||
# define NETLINK_SOCK_DIAG 4
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
unsigned long inode;
|
||||
char *details;
|
||||
|
Loading…
x
Reference in New Issue
Block a user