summaryrefslogtreecommitdiff
path: root/ext/Socket/Socket.xs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/Socket/Socket.xs')
-rw-r--r--ext/Socket/Socket.xs10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 387965e8b8..ef2778b10c 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -672,9 +672,9 @@ pack_sockaddr_in6(port, sin6_addr, scope_id=0, flowinfo=0)
sin6.sin6_port = htons(port);
sin6.sin6_flowinfo = htonl(flowinfo);
Copy(addrbytes, &sin6.sin6_addr, sizeof(sin6.sin6_addr), char);
-#if !defined(__GLIBC__) || (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
+# ifdef HAS_SIN6_SCOPE_ID
sin6.sin6_scope_id = scope_id;
-#endif
+# endif
# ifdef HAS_SOCKADDR_SA_LEN
sin6.sin6_len = sizeof(sin6);
# endif
@@ -705,11 +705,11 @@ unpack_sockaddr_in6(sin6_sv)
EXTEND(SP, 4);
mPUSHi(ntohs(sin6.sin6_port));
mPUSHp((char *)&sin6.sin6_addr, sizeof(sin6.sin6_addr));
-#if !defined(__GLIBC__) || (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
+# ifdef HAS_SIN6_SCOPE_ID
mPUSHi(sin6.sin6_scope_id);
-#else
+# else
mPUSHi(0);
-#endif
+# endif
mPUSHi(ntohl(sin6.sin6_flowinfo));
#else
ST(0) = (SV*)not_here("pack_sockaddr_in6");