summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 1adb7cc1b5..91ac8f6123 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -173,7 +173,7 @@ have_header("netinet/tcp.h")
have_header("netinet/udp.h")
$getaddr_info_ok = false
-if try_run(<<EOF)
+if not enable_config("wide-getaddrinfo", false) and try_run(<<EOF)
#include <sys/types.h>
#include <netdb.h>
#include <string.h>
@@ -292,6 +292,22 @@ else
have_header("resolv.h")
end
+if !try_link(<<EOF)
+#include <sys/types.h>
+#include <netdb.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int
+main()
+{
+ socklen_t len;
+ return 0;
+}
+EOF
+ $CFLAGS="-Dsocklen_t=int "+$CFLAGS
+end
+
have_header("sys/un.h")
if have_func(test_func)