diff options
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r-- | ext/socket/extconf.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 47addfeff8..6975994ef8 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -148,7 +148,6 @@ EOF $CFLAGS="-DHAVE_SA_LEN "+$CFLAGS end -have_header("sys/sysctl.h") have_header("netinet/tcp.h") have_header("netinet/udp.h") @@ -160,6 +159,10 @@ if try_run(<<EOF) #include <sys/socket.h> #include <netinet/in.h> +#ifndef AF_LOCAL +#define AF_LOCAL AF_UNIX +#endif + main() { int passive, gaierr, inet4 = 0, inet6 = 0; @@ -176,6 +179,7 @@ main() goto bad; } for (ai = aitop; ai; ai = ai->ai_next) { + if (ai->ai_family == AF_LOCAL) continue; if (ai->ai_addr == NULL || ai->ai_addrlen == 0 || getnameinfo(ai->ai_addr, ai->ai_addrlen, |