Remove HAVE_LINUX_GENETLINK_H ifdefs

<linux/netlink.h> is available since Linux 2.6.15 (commit
v2.6.15-rc1~53^2).

* configure.ac (AC_CHECK_HEADERS): Remove linux/genetlink.h.
* socketutils.c [!HAVE_LINUX_GENETLINK_H]: Remove.
* tests/netlink_generic.c [!HAVE_LINUX_GENETLINK_H]: Likewise.
This commit is contained in:
Eugene Syromyatnikov 2018-09-24 19:56:08 +02:00 committed by Dmitry V. Levin
parent 341eb0859d
commit b4b01268bb
3 changed files with 6 additions and 27 deletions

View File

@ -397,7 +397,6 @@ AC_CHECK_HEADERS(m4_normalize([
linux/falloc.h
linux/fib_rules.h
linux/fiemap.h
linux/genetlink.h
linux/hiddev.h
linux/if_addr.h
linux/if_link.h

View File

@ -37,9 +37,7 @@
#include <linux/unix_diag.h>
#include <linux/netlink_diag.h>
#include <linux/rtnetlink.h>
#if HAVE_LINUX_GENETLINK_H
#include <linux/genetlink.h>
#endif
#include <sys/un.h>
#ifndef UNIX_PATH_MAX
@ -593,7 +591,6 @@ print_sockaddr_by_inode(struct tcb *const tcp, const int fd,
getfdproto(tcp, fd));
}
#ifdef HAVE_LINUX_GENETLINK_H
/*
* Managing the cache for decoding communications of Netlink GENERIC protocol
*
@ -690,12 +687,3 @@ genl_families_xlat(struct tcb *tcp)
out:
return dyxlat_get(dyxlat);
}
#else /* !HAVE_LINUX_GENETLINK_H */
const struct xlat *
genl_families_xlat(struct tcb *tcp)
{
return NULL;
}
#endif

View File

@ -28,14 +28,12 @@
#include "tests.h"
#ifdef HAVE_LINUX_GENETLINK_H
# include <stdio.h>
# include <string.h>
# include <unistd.h>
# include <sys/socket.h>
# include "netlink.h"
# include <linux/genetlink.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include "netlink.h"
#include <linux/genetlink.h>
static void
test_nlmsg_type(const int fd)
@ -81,9 +79,3 @@ int main(void)
return 0;
}
#else
SKIP_MAIN_UNDEFINED("HAVE_LINUX_GENETLINK_H")
#endif