aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket/option.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/option.c')
-rw-r--r--ext/socket/option.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/socket/option.c b/ext/socket/option.c
index 5be3eb5e4c..caac0abb26 100644
--- a/ext/socket/option.c
+++ b/ext/socket/option.c
@@ -233,6 +233,7 @@ inspect_int(int level, int optname, VALUE data, VALUE ret)
}
}
+#if defined(IPV6_MULTICAST_IF) || defined(IPV6_MULTICAST_LOOP)
static int
inspect_uint(int level, int optname, VALUE data, VALUE ret)
{
@@ -246,6 +247,7 @@ inspect_uint(int level, int optname, VALUE data, VALUE ret)
return 0;
}
}
+#endif
#if defined(SOL_SOCKET) && defined(SO_LINGER) /* POSIX */
static int
@@ -305,7 +307,8 @@ inspect_peercred(int level, int optname, VALUE data, VALUE ret)
if (RSTRING_LEN(data) == sizeof(struct ucred)) {
struct ucred cred;
memcpy(&cred, RSTRING_PTR(data), sizeof(struct ucred));
- rb_str_catf(ret, " pid=%u euid=%u egid=%u", cred.pid, cred.uid, cred.gid);
+ rb_str_catf(ret, " pid=%u euid=%u egid=%u",
+ (unsigned)cred.pid, (unsigned)cred.uid, (unsigned)cred.gid);
rb_str_cat2(ret, " (ucred)");
return 1;
}