summaryrefslogtreecommitdiff
path: root/pp_sys.c
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 /pp_sys.c
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 'pp_sys.c')
-rw-r--r--pp_sys.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/pp_sys.c b/pp_sys.c
index ee02ccd2f1..3285574dae 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -98,12 +98,6 @@ extern int h_errno;
# endif
#endif
-#ifdef I_SYS_UN
-# ifdef __linux__
-# include <sys/un.h>
-# endif
-#endif
-
/* Put this after #includes because fork and vfork prototypes may conflict. */
#ifndef HAS_VFORK
# define vfork fork
@@ -1577,13 +1571,6 @@ PP(pp_sysread)
if (!(IoFLAGS(io) & IOf_UNTAINT))
SvTAINTED_on(bufsv);
SP = ORIGMARK;
-#if defined(I_SYS_UN) && defined(__linux__)
- /* Linux returns the sum of actual pathname string length and the
- size of the other members of sockaddr_un members. It should
- return sizeof(struct sockaddr_un). */
- if (((struct sockaddr *)namebuf)->sa_family == AF_UNIX)
- bufsize = sizeof(struct sockaddr_un);
-#endif
sv_setpvn(TARG, namebuf, bufsize);
PUSHs(TARG);
RETURN;
@@ -2464,12 +2451,6 @@ PP(pp_accept)
setbuf( IoIFP(nstio), NULL); /* EPOC gets confused about sockets */
#endif
-#if defined(I_SYS_UN) && defined(__linux__)
- /* see the comment in pp_sysread */
- if (saddr.sa_family == AF_UNIX)
- len = sizeof(struct sockaddr_un);
-#endif
-
PUSHp((char *)&saddr, len);
RETURN;
@@ -2647,11 +2628,6 @@ PP(pp_getpeername)
if (len == BOGUS_GETNAME_RETURN)
len = sizeof(struct sockaddr);
#endif
-#if defined(I_SYS_UN) && defined(__linux__)
- /* see the comment in pp_sysread */
- if (((struct sockaddr *)SvPVX(sv))->sa_family == AF_UNIX)
- len = sizeof(struct sockaddr_un);
-#endif
SvCUR_set(sv, len);
*SvEND(sv) ='\0';
PUSHs(sv);