develooper Front page | perl.perl5.porters | Postings from December 2013

[perl #120835] IO::Socket getsockopt subroutine on AIX

Thread Previous | Thread Next
From:
Reini Urban via RT
Date:
December 21, 2013 17:44
Subject:
[perl #120835] IO::Socket getsockopt subroutine on AIX
Message ID:
rt-4.0.18-16195-1387647834-710.120835-15-0@perl.org
https://groups.google.com/forum/#!topic/mojolicious/T34XZX72LaA

John K. patch looks good but can you test it?

pp_sys.c:
     case OP_GSOCKOPT: 
         SvGROW(sv, 257); 
         (void)SvPOK_only(sv); 
         SvCUR_set(sv,256); 
         *SvEND(sv) ='\0'; 
         len = SvCUR(sv); 
         if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0) 
             goto nuts2; 
         SvCUR_set(sv, len); 
         *SvEND(sv) ='\0'; 
         PUSHs(sv); 
         break; 
=>
     if (PerlSock_getsockopt(fd, lvl, optname, SvPVX(sv), &len) < 0) 
        goto nuts2; 
   #if defined(_AIX) 
     if (len == 256) 
        len = sizeof(int); 
   #endif 
     SvCUR_set(sv, len); 
     ... 
-- 
Reini Urban

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=120835

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About