Skip Menu |
 

This queue is for tickets about the Net-Ident CPAN distribution.

Report information
The Basics
Id: 79165
Status: resolved
Priority: 0/
Queue: Net-Ident

People
Owner: Nobody in particular
Requestors: PLICEASE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.23
Fixed in: (no value)



Subject: Installs but doesn't work in Windows (Strawberry Perl)
Download (untitled) / with headers
text/plain 1.2k
I got this error when using Net::Ident in windows: your vendor has not defined POSIX macro F_SETFL This patch seems to work for me on windows. It passes the tests, and works for the application that I am working on the same in linux and windows with this patch. Using ->socket instead of F_SETFL may be more portable, but I've only used it for MSWin32. If any more details are required I'd be happy to provide them. Thanks! diff --git a/Ident.pm b/Ident.pm index 31496b8..a21bc66 100644 --- a/Ident.pm +++ b/Ident.pm @@ -175,12 +175,16 @@ sub newFromInAddr { bind($self->{fh}, $localbind) or die "= bind failed: $!\n"; # make it a non-blocking socket - fcntl($self->{fh}, F_SETFL, $NONBLOCK) or die "= fcntl failed: $!\n"; + if($^O ne 'MSWin32') { + fcntl($self->{fh}, F_SETFL, $NONBLOCK) or die "= fcntl failed: $!\n"; + } # connect it to the remote identd port, this can return EINPROGRESS. # for some reason, reading $! twice doesn't work as it should connect($self->{fh}, $identbind) or $!{EINPROGRESS} or die "= connect failed: $!\n"; + + $self->{fh}->blocking(0) if $^O eq 'MSWin32'; }; if ( $@ =~ /^= (.*)/ ) { # here's the catch of the throw
Download (untitled) / with headers
text/plain 269b
Any chance on fixing this. I'd suggest that applying the patch provided would do the trick on Windows without adversely effecting other platforms. If you don't have the time or interest to maintain this module, perhaps I could help out and roll fixed release for you.
Download (untitled) / with headers
text/plain 517b
On Tue Sep 09 15:23:04 2014, PLICEASE wrote: Show quoted text
> Any chance on fixing this. I'd suggest that applying the patch > provided would do the trick on Windows without adversely effecting > other platforms. If you don't have the time or interest to maintain > this module, perhaps I could help out and roll fixed release for you.
Please take a look at this commit and confirm it's correct. Your patch didn't apply cleanly for some reason. https://github.com/toddr/Net-Ident/commit/d9eb2672c9fe658954b502b98f69cec7aa21a8bd
Actually 1.24 is out to PAUSE. No need to re-open unless you see a Problem. Thanks for the report.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.