added check for some networking headers

This commit is contained in:
hyung-hwan 2023-11-18 22:30:35 +09:00
parent 52829974ec
commit 6b774bb235
5 changed files with 24 additions and 7 deletions

View File

@ -163,8 +163,8 @@ am__DIST_COMMON = $(srcdir)/Dockerfile.in $(srcdir)/Makefile.in \
$(top_srcdir)/ac/install-sh $(top_srcdir)/ac/ltmain.sh \ $(top_srcdir)/ac/install-sh $(top_srcdir)/ac/ltmain.sh \
$(top_srcdir)/ac/missing $(top_srcdir)/ac/tap-driver.sh \ $(top_srcdir)/ac/missing $(top_srcdir)/ac/tap-driver.sh \
$(top_srcdir)/pkgs/hio.spec.in ac/ar-lib ac/compile \ $(top_srcdir)/pkgs/hio.spec.in ac/ar-lib ac/compile \
ac/config.guess ac/config.sub ac/install-sh ac/ltmain.sh \ ac/config.guess ac/config.sub ac/depcomp ac/install-sh \
ac/missing ac/ltmain.sh ac/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION) distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir) top_distdir = $(distdir)

9
configure vendored
View File

@ -15024,6 +15024,15 @@ if test "x$ac_cv_header_net_if_dl_h" = xyes
then : then :
printf "%s\n" "#define HAVE_NET_IF_DL_H 1" >>confdefs.h printf "%s\n" "#define HAVE_NET_IF_DL_H 1" >>confdefs.h
fi
ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "
#include <sys/types.h>
#include <sys/socket.h>
"
if test "x$ac_cv_header_netinet_if_ether_h" = xyes
then :
printf "%s\n" "#define HAVE_NETINET_IF_ETHER_H 1" >>confdefs.h
fi fi
ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" " ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "
#include <sys/types.h> #include <sys/types.h>

View File

@ -117,7 +117,7 @@ AC_CHECK_HEADERS([sys/resource.h sys/wait.h sys/syscall.h sys/ioctl.h])
AC_CHECK_HEADERS([sys/sendfile.h sys/epoll.h sys/event.h sys/poll.h]) AC_CHECK_HEADERS([sys/sendfile.h sys/epoll.h sys/event.h sys/poll.h])
AC_CHECK_HEADERS([sys/sysctl.h sys/socket.h sys/sockio.h sys/un.h]) AC_CHECK_HEADERS([sys/sysctl.h sys/socket.h sys/sockio.h sys/un.h])
AC_CHECK_HEADERS([ifaddrs.h tiuser.h linux/netfilter_ipv4.h netinet/in.h netinet/sctp.h]) AC_CHECK_HEADERS([ifaddrs.h tiuser.h linux/netfilter_ipv4.h netinet/in.h netinet/sctp.h])
AC_CHECK_HEADERS([net/if.h net/if_dl.h netpacket/packet.h net/bpf.h], [], [], [ AC_CHECK_HEADERS([net/if.h net/if_dl.h netinet/if_ether.h netpacket/packet.h net/bpf.h], [], [], [
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h>]) #include <sys/socket.h>])
AC_CHECK_HEADERS([sys/stropts.h sys/macstat.h linux/ethtool.h linux/sockios.h]) AC_CHECK_HEADERS([sys/stropts.h sys/macstat.h linux/ethtool.h linux/sockios.h])

View File

@ -208,6 +208,9 @@
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H #undef HAVE_NDIR_H
/* Define to 1 if you have the <netinet/if_ether.h> header file. */
#undef HAVE_NETINET_IF_ETHER_H
/* Define to 1 if you have the <netinet/in.h> header file. */ /* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H #undef HAVE_NETINET_IN_H

View File

@ -32,10 +32,15 @@
#include <errno.h> #include <errno.h>
#include <string.h> /* strerror */ #include <string.h> /* strerror */
#include <netinet/in.h> #if defined(HAVE_NETINET_IN_H)
#include <arpa/inet.h> # include <netinet/in.h>
#include <net/if.h> #endif
#include <netinet/if_ether.h> #if defined(HAVE_NET_IF_H)
# include <net/if.h>
#endif
#if defined(HAVE_NETINET_IF_ETHER_H)
# include <netinet/if_ether.h>
#endif
#if defined(HAVE_NETINET_SCTP_H) #if defined(HAVE_NETINET_SCTP_H)
# include <netinet/sctp.h> # include <netinet/sctp.h>