Nmap Development mailing list archives
Re: Some patches
From: David Fifield <david () bamsoftware com>
Date: Sat, 6 Oct 2012 13:22:56 -0700
On Fri, Oct 05, 2012 at 06:15:43PM +0400, arrowdodger wrote:
Hi, i have some patches fixing buildsystem stuff and adding clang compatability: http://intara.arrowdodger.ru/patch-clang-fixes --- scan_engine.cc_ 2012-10-05 11:13:12.003554110 +0400 +++ scan_engine.cc 2012-10-05 11:14:37.463551910 +0400 @@ -2904,7 +2904,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; --- traceroute.cc_ 2012-10-05 11:33:54.413552510 +0400 +++ traceroute.cc 2012-10-05 11:34:15.976550750 +0400 @@ -169,8 +169,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; @@ -204,6 +202,9 @@ } }; +/* 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;
Can you give us some more information on this patch? What version of Clang do you use? People have successfully built using Clang in the past. What are the specific warnings or errors that you see?
http://intara.arrowdodger.ru/patch-configure-cxxflags-fix --- _configure 2012-10-05 10:15:36.678551512 +0400 +++ configure 2012-10-05 10:15:45.366548872 +0400 @@ -2398,7 +2398,7 @@ fi if test -d /usr/local/include; then CFLAGS="$CFLAGS -I/usr/local/include" - CXXFLAGS="$CFLAGS -I/usr/local/include" + CXXFLAGS="$CXXFLAGS -I/usr/local/include" fi fi
Thanks, this was a real bug and I have committed it.
http://intara.arrowdodger.ru/patch-Makefile-cxxflags-fix --- Makefile.in_ 2012-10-05 10:17:36.037550752 +0400 +++ Makefile.in 2012-10-05 10:17:08.205548992 +0400 @@ -46,7 +46,7 @@ # DEFS += -DMTRACE=1 CXXFLAGS = @CXXFLAGS@ $(DBGFLAGS) $(CCOPT) CPPFLAGS = @CPPFLAGS@ $(DEFS) -export CFLAGS = $(CXXFLAGS) +export CFLAGS = @CFLAGS@ # CFLAGS = $(DEFS) $(INCLS) STATIC = LDFLAGS = @LDFLAGS@ $(DBGFLAGS) $(STATIC)
I think it is intentional that CFLAGS is getting a copy of CXXFLAGS, so I didn't commit this. 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:
- Some patches arrowdodger (Oct 05)
- Re: Some patches David Fifield (Oct 06)
- Re: Some patches arrowdodger (Oct 09)
- Re: Some patches David Fifield (Oct 10)
- Re: Some patches David Fifield (Oct 10)
- Re: Some patches David Fifield (Oct 10)
- Re: Some patches arrowdodger (Oct 09)
- Re: Some patches David Fifield (Oct 06)