summaryrefslogtreecommitdiff
path: root/ext/Socket
diff options
context:
space:
mode:
authorRadu Greab <radu@netsoft.ro>2001-03-30 18:09:06 +0300
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-30 14:41:11 +0000
commit36902e12d2b30e9370acddd3ddab927d842061cf (patch)
treeac1c997efb5e2bd7cc9f7247179a2dbed15cb99a /ext/Socket
parent90b75b6104d3f2a3e6455d22675af95dad851d5d (diff)
downloadperl-36902e12d2b30e9370acddd3ddab927d842061cf.tar.gz
Re: [ID 20010215.006] Bad arg length for Socket::unpack_sockaddr_un, length is 14 ...
Message-ID: <15044.30562.566390.559726@ix.netsoft.ro> Replace #9352. p4raw-id: //depot/perl@9470
Diffstat (limited to 'ext/Socket')
-rw-r--r--ext/Socket/Socket.xs5
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 );