@@ -26,10 +26,10 @@ index 4b33b3f..d068292 100644
2626 defined(__APPLE__) || \
2727 defined(_WIN32) || \
2828diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
29- index d99edfe..a19b6db 100644
29+ index d94e96a..e584e8e 100644
3030--- a/ext/socket/raddrinfo.c
3131+++ b/ext/socket/raddrinfo.c
32- @@ -1670 ,10 +1670 ,21 @@ addrinfo_mload(VALUE self, VALUE ary)
32+ @@ -1723 ,10 +1723 ,21 @@ addrinfo_mload(VALUE self, VALUE ary)
3333 INIT_SOCKADDR_UN(&uaddr, sizeof(struct sockaddr_un));
3434
3535 StringValue(v);
@@ -51,7 +51,7 @@ index d99edfe..a19b6db 100644
5151 memcpy(uaddr.sun_path, RSTRING_PTR(v), RSTRING_LEN(v));
5252 len = (socklen_t)sizeof(uaddr);
5353 memcpy(&ss, &uaddr, len);
54- @@ -2317 ,10 +2328 ,21 @@ addrinfo_unix_path(VALUE self)
54+ @@ -2370 ,10 +2381 ,21 @@ addrinfo_unix_path(VALUE self)
5555 if (n < 0)
5656 rb_raise(rb_eSocket, "too short AF_UNIX address: %"PRIuSIZE" bytes given for minimum %"PRIuSIZE" bytes.",
5757 (size_t)rai->sockaddr_len, offsetof(struct sockaddr_un, sun_path));
@@ -74,31 +74,31 @@ index d99edfe..a19b6db 100644
7474 }
7575 #endif
7676diff --git a/test/fiddle/test_handle.rb b/test/fiddle/test_handle.rb
77- index 17f9c92..2862585 100644
77+ index 7e3ff9d..3799347 100644
7878--- a/test/fiddle/test_handle.rb
7979+++ b/test/fiddle/test_handle.rb
80- @@ -150 ,6 +150 ,7 @@ module Fiddle
80+ @@ -174 ,6 +174 ,7 @@ module Fiddle
8181 end unless /mswin|mingw/ =~ RUBY_PLATFORM
8282
8383 def test_dlerror
8484+ return if /kfreebsd/ =~ RUBY_PLATFORM
8585 # FreeBSD (at least 7.2 to 7.2) calls nsdispatch(3) when it calls
8686 # getaddrinfo(3). And nsdispatch(3) doesn't call dlerror(3) even if
8787 # it calls _nss_cache_cycle_prevention_function with dlsym(3).
88- @@ -158 ,7 +159 ,7 @@ module Fiddle
88+ @@ -182 ,7 +183 ,7 @@ module Fiddle
8989 require 'socket'
9090 Socket.gethostbyname("localhost")
9191 Fiddle.dlopen("/lib/libc.so.7").sym('strcpy')
9292- end if /freebsd/=~ RUBY_PLATFORM
9393+ end if /freebsd/ =~ RUBY_PLATFORM
9494
9595 def test_no_memory_leak
96- assert_no_memory_leak(%w[-W0 -rfiddle.so], '', '100_000.times {Fiddle::Handle.allocate}; GC.start', rss: true )
96+ if respond_to?(:assert_nothing_leaked_memory )
9797diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
98- index b5be0c7..b0fe707 100644
98+ index 7e596f0..930bb61 100644
9999--- a/test/socket/test_socket.rb
100100+++ b/test/socket/test_socket.rb
101- @@ -530 ,7 +530 ,7 @@ class TestSocket < Test::Unit::TestCase
101+ @@ -541 ,7 +541 ,7 @@ class TestSocket < Test::Unit::TestCase
102102 end
103103
104104 def test_bintime
0 commit comments