… | |
… | |
507 | |
507 | |
508 | # perl contains a bug (imho) where it requires that the kernel always returns |
508 | # perl contains a bug (imho) where it requires that the kernel always returns |
509 | # sockaddr_un structures of maximum length (which is not, AFAICS, required |
509 | # sockaddr_un structures of maximum length (which is not, AFAICS, required |
510 | # by any standard). try to 0-pad structures for the benefit of those platforms. |
510 | # by any standard). try to 0-pad structures for the benefit of those platforms. |
511 | |
511 | |
512 | my $sa_un_zero = Socket::pack_sockaddr_un ""; $sa_un_zero ^= $sa_un_zero; |
512 | my $sa_un_zero = eval { Socket::pack_sockaddr_un "" }; $sa_un_zero ^= $sa_un_zero; |
513 | |
513 | |
514 | sub unpack_sockaddr($) { |
514 | sub unpack_sockaddr($) { |
515 | my $af = sockaddr_family $_[0]; |
515 | my $af = sockaddr_family $_[0]; |
516 | |
516 | |
517 | if ($af == AF_INET) { |
517 | if ($af == AF_INET) { |