
Nmap Development mailing list archives
Re: small patch allowing build with -stdlib=libc++
From: olli hauer <ohauer () gmx de>
Date: Thu, 17 Apr 2014 22:55:47 +0200
On 2014-04-17 21:50, Daniel Miller wrote:
On 04/17/2014 02:23 PM, olli hauer wrote:Hi, is it possible to adopt the following patch to make the compiler happy and also allow usage of -stdlib=libc++ Index: scan_engine.cc =================================================================== --- scan_engine.cc (revision 32836) +++ scan_engine.cc (working copy) @@ -3129,7 +3129,7 @@ } if (o.spoofsource && !bind_failed) { o.SourceSockAddr(&ss, &sslen); - if (bind(sd, (struct sockaddr*)&ss, sslen) != 0) { + if (::bind(sd, (struct sockaddr*)&ss, sslen) != 0) { error("%s: Problem binding source address (%s), errno: %d", __func__, inet_socktop(&ss), socket_errno()); perror("bind"); bind_failed = 1; Index: traceroute.cc =================================================================== --- traceroute.cc (revision 32836) +++ traceroute.cc (working copy) @@ -221,8 +221,6 @@ /* A global random token used to distinguish this traceroute's probes from those of other traceroutes possibly running on the same machine. */ static u16 global_id; -/* A global cache of known hops, indexed by TTL and address. */ -static std::map<struct HopIdent, Hop *> hop_cache; /* A list of timedout hops, which are not kept in hop_cache, so we can delete all hops on occasion. */ static std::list<Hop *> timedout_hops; @@ -235,6 +233,9 @@ static struct timeval get_now(struct timeval *now = NULL); static const char *ss_to_string(const struct sockaddr_storage *ss); +/* A global cache of known hops, indexed by TTL and address. */ +static std::map<struct HopIdent, Hop *> hop_cache; + struct Hop { Hop *parent; struct sockaddr_storage tag; _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/Olli, I appreciate your reports improving Nmap's standards compliance. I think I understand qualifying ::bind to avoid collision with std::bind, but what is the purpose of the second part of the patch? What is the error that clang++ is giving? I don't have my clang build environment up and running at the moment, unfortunately. Dan
Hi Dan, please forget about the second patch, seems it was only required on FreeBSD9 beta but no longer on 9.0+ RELEASE -- Regards, olli _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- small patch allowing build with -stdlib=libc++ olli hauer (Apr 17)
- Re: small patch allowing build with -stdlib=libc++ Daniel Miller (Apr 17)
- Re: small patch allowing build with -stdlib=libc++ olli hauer (Apr 17)
- Re: small patch allowing build with -stdlib=libc++ Daniel Miller (Apr 17)
- Re: small patch allowing build with -stdlib=libc++ olli hauer (Apr 17)
- Re: small patch allowing build with -stdlib=libc++ Daniel Miller (Apr 17)