ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent/lib/AnyEvent/Socket.pm
(Generate patch)

Comparing AnyEvent/lib/AnyEvent/Socket.pm (file contents):
Revision 1.113 by root, Sun Aug 16 16:54:51 2009 UTC vs.
Revision 1.114 by root, Fri Aug 21 11:59:25 2009 UTC

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
512my $sa_un_zero = Socket::pack_sockaddr_un ""; $sa_un_zero ^= $sa_un_zero; 512my $sa_un_zero = eval { Socket::pack_sockaddr_un "" }; $sa_un_zero ^= $sa_un_zero;
513 513
514sub unpack_sockaddr($) { 514sub 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) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines