From 79c932f0fc58fd4c6000b5c0d13b24ccd93b879b Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Thu, 30 Dec 2010 20:50:13 +0000 Subject: Give a warning if pack_sockaddr_in6 is asked to pack a non-zero scope_id on machines that can't support it --- ext/Socket/Socket.xs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ext') 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); -- cgit v1.2.1