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, 18 insertions, 0 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 45e596700c..357025cbbb 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -321,6 +321,24 @@ $objs = ["socket.#{$OBJEXT}"]
if $getaddr_info_ok and have_func("getaddrinfo") and have_func("getnameinfo")
have_getaddrinfo = true
+else
+ if try_link(<<EOF)
+#include <sys/types.h>
+#include <netdb.h>
+#include <string.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int
+main()
+{
+ struct in6_addr addr;
+ unsigned char c;
+ c = addr.s6_addr8;
+ return 0;
+}
+EOF
+ $CFLAGS="-DHAVE_ADDR8 "+$CFLAGS
+ end
end
if have_getaddrinfo