diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/extconf.rb | 2 | ||||
-rw-r--r-- | ext/socket/socket.c | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index f2eddc0bba..47addfeff8 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -149,6 +149,8 @@ EOF end have_header("sys/sysctl.h") +have_header("netinet/tcp.h") +have_header("netinet/udp.h") $getaddr_info_ok = false if try_run(<<EOF) diff --git a/ext/socket/socket.c b/ext/socket/socket.c index f7840948f8..a1d707122e 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -16,6 +16,12 @@ #ifndef NT #include <sys/socket.h> #include <netinet/in.h> +#ifdef NETINET_TCP +# include <netinet/tcp.h> +#endif +#ifdef NETINET_UDP +# include <netinet/udp.h> +#endif #include <netdb.h> #endif #include <errno.h> |