diff --git a/configure.ac b/configure.ac index 422bfac9acddf..8887c2aea650d 100644 --- a/configure.ac +++ b/configure.ac @@ -395,6 +395,7 @@ fcntl.h \ grp.h \ ieeefp.h \ langinfo.h \ +linux/sock_diag.h \ malloc.h \ poll.h \ pty.h \ diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index f5843d5d4d743..fec1e5159c5f7 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -55,8 +55,10 @@ # if HAVE_IF_NAMETOINDEX # include # endif -# ifdef SO_MEMINFO +# if defined(HAVE_LINUX_SOCK_DIAG_H) # include +# else +# undef SO_MEMINFO # endif #endif