diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-23 08:17:47 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-23 08:29:53 -0400 |
commit | ee2276e59a3c027cb89c721d866c9db4ba683a7b (patch) | |
tree | 6c98ff0e5f8be1648c8598533211944146ebe7fb | |
parent | 0f83c5a4f945d1919a6ff6564a3a18375f15f949 (diff) | |
download | perl-ee2276e59a3c027cb89c721d866c9db4ba683a7b.tar.gz |
AIX doesn't set the length in getsockopt.
[perl #120835] and [rt #91183] and [rt #85570]
Seen errors in blead smoke in AIX 6.1:
cpan/IO-Socket-IP/t/18fdopen .................................. Argument
"\0\0\0^A\0\0\0r\0\0\0\0\0\0\0\0?M-^U\0\0M-^E^[^???\0^N\0..." isn't
numeric in numeric eq (==) at ../../lib/IO/Socket/IP.pm line 748.
cpan/IO-Socket-IP/t/31nonblocking-connect-internet ............ Argument
"\0\0\0\0\0\0\0\0?\0\n^B1?\0\0\0^B\0^BM-\rf?^H?\0^N\0^B?|..." isn't
numeric in scalar assignment at ../../lib/IO/Socket/IP.pm line 707.
-rw-r--r-- | pp_sys.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2676,6 +2676,11 @@ PP(pp_ssockopt) len = SvCUR(sv); if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0) goto nuts2; +#if defined(_AIX) + /* XXX Configure test: does getsockopt set the length properly? */ + if (len == 256) + len = sizeof(int); +#endif SvCUR_set(sv, len); *SvEND(sv) ='\0'; PUSHs(sv); |