aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ext/socket/option.c2
-rw-r--r--test/socket/test_unix.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/option.c b/ext/socket/option.c
index ff60cfb53c..980acda85d 100644
--- a/ext/socket/option.c
+++ b/ext/socket/option.c
@@ -256,7 +256,7 @@ inspect_peercred(int level, int optname, VALUE data, VALUE ret)
}
#endif
-#if defined(LOCAL_PEERCRED) /* FreeBSD */
+#if defined(LOCAL_PEERCRED) /* FreeBSD, MacOS X */
static int
inspect_local_peercred(int level, int optname, VALUE data, VALUE ret)
{
diff --git a/test/socket/test_unix.rb b/test/socket/test_unix.rb
index 6b54594736..fb0c47d348 100644
--- a/test/socket/test_unix.rb
+++ b/test/socket/test_unix.rb
@@ -313,7 +313,7 @@ class TestUNIXSocket < Test::Unit::TestCase
end
def test_getcred_xucred
- return if /freebsd/ !~ RUBY_PLATFORM
+ return if /freebsd|darwin/ !~ RUBY_PLATFORM
Dir.mktmpdir {|d|
sockpath = "#{d}/sock"
serv = Socket.unix_server_socket(sockpath)