Skip to content

Commit 30c8f3a

Browse files
devnexencmb69
authored andcommitted
Fix GH-8674: sockets extension won't build for older Linux kernels
In abscence of the needed header, disable the feature altogether. Closes GH-8677.
1 parent ca6d1fd commit 30c8f3a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ fcntl.h \
395395
grp.h \
396396
ieeefp.h \
397397
langinfo.h \
398+
linux/sock_diag.h \
398399
malloc.h \
399400
poll.h \
400401
pty.h \

ext/sockets/sockets.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,10 @@
5555
# if HAVE_IF_NAMETOINDEX
5656
# include <net/if.h>
5757
# endif
58-
# ifdef SO_MEMINFO
58+
# if defined(HAVE_LINUX_SOCK_DIAG_H)
5959
# include <linux/sock_diag.h>
60+
# else
61+
# undef SO_MEMINFO
6062
# endif
6163
#endif
6264

0 commit comments

Comments
 (0)