diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/Socket/Socket.xs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 0584e785b5..e08982909b 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -1006,12 +1006,15 @@ unpack_sockaddr_un(sun_sv) STRLEN sockaddrlen; char * sun_ad = SvPV(sun_sv,sockaddrlen); char * e; - +# ifndef __linux__ + /* On Linux sockaddrlen on sockets returned by accept, recvfrom, + getpeername and getsockname is not equal to sizeof(addr). */ if (sockaddrlen != sizeof(addr)) { croak("Bad arg length for %s, length is %d, should be %d", "Socket::unpack_sockaddr_un", sockaddrlen, sizeof(addr)); } +# endif Copy( sun_ad, &addr, sizeof addr, char ); |