From b159565774736e99ec3ccd2707eb0164ac684a1f Mon Sep 17 00:00:00 2001 From: jcmichelou Date: Sat, 24 Jun 2017 16:20:18 +0200 Subject: [PATCH] Add check for ioctl header file. --- configure.ac | 2 +- src/coap_io.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f517d175..3873d8ea 100644 --- a/configure.ac +++ b/configure.ac @@ -324,7 +324,7 @@ fi # Checks for header files. AC_CHECK_HEADERS([assert.h arpa/inet.h limits.h netdb.h netinet/in.h \ stdlib.h string.h strings.h sys/socket.h sys/time.h \ - time.h unistd.h sys/unistd.h syslog.h]) + time.h unistd.h sys/unistd.h syslog.h sys/ioctl.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T diff --git a/src/coap_io.c b/src/coap_io.c index fb20cf4e..d10a01de 100644 --- a/src/coap_io.c +++ b/src/coap_io.c @@ -19,6 +19,9 @@ # include # define OPTVAL_T(t) (t) #endif +#ifdef HAVE_SYS_IOCTL_H + #include +#endif #ifdef HAVE_NETINET_IN_H # include #endif