summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1996-12-23 12:58:58 +1200
committerChip Salzenberg <chip@atlantic.net>1996-12-23 12:58:58 +1200
commit13826f2cf81099b832a12ff02c10a2f9d23cd6e5 (patch)
tree24a90e6abe01e18770f4fe58907acc2f6a5ece4a /pp_sys.c
parentd97d40b5b09d6d89f9fc39d5d51be2de4320c77b (diff)
downloadperl-13826f2cf81099b832a12ff02c10a2f9d23cd6e5.tar.gz
Fixes for Interactive Unix
(this is the same change as commit 1ab5d0547ab7398ea9e3e00b1c1b0f1f8ea0dd94, but as applied)
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 5e096feff8..72b8df5481 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -121,7 +121,7 @@ static int dooneliner _((char *cmd, char *filename));
# endif /* no flock() or fcntl(F_SETLK,...) */
# ifdef FLOCK
- static int FLOCK(int, int);
+ static int FLOCK _((int, int));
/*
* These are the flock() constants. Since this sytems doesn't have
@@ -1860,6 +1860,12 @@ PP(pp_getpeername)
goto nuts2;
break;
}
+#ifdef BOGUS_GETNAME_RETURN
+ /* Interactive Unix, getpeername() and getsockname()
+ does not return valid namelen */
+ if (aint == BOGUS_GETNAME_RETURN)
+ aint = sizeof(struct sockaddr);
+#endif
SvCUR_set(sv,aint);
*SvEND(sv) ='\0';
PUSHs(sv);