net.c: include <linux/icmp.h> unconditionally

* configure.ac (AC_CHECK_HEADERS): Remove linux/icmp.h.
* net.c: Follow the example of tests/net-icmp_filter.c and include
<linux/icmp.h> unconditionally.
This commit is contained in:
Дмитрий Левин 2016-06-15 21:27:41 +00:00
parent 9457304b4c
commit d06010b3c4
2 changed files with 2 additions and 4 deletions

View File

@ -414,7 +414,7 @@ AC_CHECK_HEADERS([netinet/tcp.h netinet/udp.h],,, [#include <netinet/in.h>])
AC_CHECK_HEADERS([linux/mqueue.h],,, [#include <linux/types.h>])
AC_CHECK_HEADERS([linux/icmp.h linux/in6.h linux/if_packet.h],,,
AC_CHECK_HEADERS([linux/in6.h linux/if_packet.h],,,
[#include <stddef.h>
#include <sys/socket.h>
#include <asm/types.h>])

4
net.c
View File

@ -71,9 +71,7 @@
#if defined(HAVE_LINUX_IF_PACKET_H)
# include <linux/if_packet.h>
#endif
#if defined(HAVE_LINUX_ICMP_H)
# include <linux/icmp.h>
#endif
#include <linux/icmp.h>
#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
# include <bluetooth/bluetooth.h>
# include <bluetooth/hci.h>