summaryrefslogtreecommitdiff
path: root/ext/Socket
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <leonerd@leonerd.org.uk>2010-12-30 20:50:13 +0000
committerJesse Vincent <jesse@bestpractical.com>2011-01-03 12:21:35 +0800
commit79c932f0fc58fd4c6000b5c0d13b24ccd93b879b (patch)
tree1b9c7444019ffe1f7fb5788019910fda21233854 /ext/Socket
parent24b8ee2e0151c5d8b3f6b5ef1346c3144981636a (diff)
downloadperl-79c932f0fc58fd4c6000b5c0d13b24ccd93b879b.tar.gz
Give a warning if pack_sockaddr_in6 is asked to pack a non-zero scope_id on machines that can't support it
Diffstat (limited to 'ext/Socket')
-rw-r--r--ext/Socket/Socket.xs4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index ef2778b10c..3c57048aa7 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -674,6 +674,10 @@ pack_sockaddr_in6(port, sin6_addr, scope_id=0, flowinfo=0)
Copy(addrbytes, &sin6.sin6_addr, sizeof(sin6.sin6_addr), char);
# ifdef HAS_SIN6_SCOPE_ID
sin6.sin6_scope_id = scope_id;
+# else
+ if(scope_id != 0)
+ warn("%s cannot represent non-zero scope_id %d",
+ "Socket::pack_sockaddr_in6", scope_id);
# endif
# ifdef HAS_SOCKADDR_SA_LEN
sin6.sin6_len = sizeof(sin6);