Nmap Development mailing list archives
Re: [PATCH] nsock_core.c unsigned int compilation error
From: David Fifield <david () bamsoftware com>
Date: Thu, 28 Oct 2010 15:21:22 -0700
On Sun, Oct 24, 2010 at 11:15:56PM +0100, Rob Nicholls wrote:
I recently tried compiling Nmap from SVN and was surprised to see it was failing on Windows! It seems that nsock_core.c was trying to pass an unsigned integer value (peerlen) to recvfrom when it was expecting an integer (according to Visual C++ 2008 SP1). As peerlen holds the rather small value returned from "sizeof(peer)", I'm pretty sure (but I'm not that hot on C) that it's fine to simply remove the word "unsigned", and this does appear to allow Nmap to compile and run okay on Windows (only tested it briefly). I hope I've fixed it correctly.
Thanks Rob. I think it might be unsigned on some operating systems (BSD?) so I changed it to socklen_t which should hide the differences. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [PATCH] nsock_core.c unsigned int compilation error Rob Nicholls (Oct 24)
- Re: [PATCH] nsock_core.c unsigned int compilation error David Fifield (Oct 28)
- Re: [PATCH] nsock_core.c unsigned int compilation error Djalal Harouni (Oct 29)
- Re: [PATCH] nsock_core.c unsigned int compilation error David Fifield (Oct 29)
- Re: [PATCH] nsock_core.c unsigned int compilation error Djalal Harouni (Oct 29)
- Re: [PATCH] nsock_core.c unsigned int compilation error David Fifield (Oct 28)