FreeBSD Bugzilla – Attachment 128501 Details for
Bug 172358
[PATCH] security/nmap: Fix build with clang.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.27 KB, created by
Gleb Popov
on 2012-10-05 15:00:14 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Gleb Popov
Created:
2012-10-05 15:00:14 UTC
Size:
3.27 KB
patch
obsolete
>diff -ruN /usr/ports/security/nmap/Makefile ./Makefile >--- /usr/ports/security/nmap/Makefile 2012-10-05 17:48:36.428550058 +0400 >+++ ./Makefile 2012-10-05 17:46:53.337549058 +0400 >@@ -33,7 +33,7 @@ > CONFIGURE_ENV= LUA_INCDIR="${LUA_INCDIR}" LUA_LIBDIR="${LUA_LIBDIR}" > > # fix for gcc from ports >-.if ${CC} != "cc" >+.if ${CC} != "cc" && ${CC} !="clang" > GCCLIBDIR_CMDS= ${CC} -print-file-name=libstdc++.so | ${SED} -e 's/libstdc++.so//' > CONFIGURE_ARGS+=LDFLAGS="-L$$(${GCCLIBDIR_CMDS})" > NDCC= true >diff -ruN /usr/ports/security/nmap/files/patch-Makefile-cxxflags-fix ./files/patch-Makefile-cxxflags-fix >--- /usr/ports/security/nmap/files/patch-Makefile-cxxflags-fix 1970-01-01 03:00:00.000000000 +0300 >+++ ./files/patch-Makefile-cxxflags-fix 2012-10-05 11:07:04.000000000 +0400 >@@ -0,0 +1,11 @@ >+--- 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) >diff -ruN /usr/ports/security/nmap/files/patch-clang-fixes ./files/patch-clang-fixes >--- /usr/ports/security/nmap/files/patch-clang-fixes 1970-01-01 03:00:00.000000000 +0300 >+++ ./files/patch-clang-fixes 2012-10-05 17:45:06.143551658 +0400 >@@ -0,0 +1,32 @@ >+--- 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; >diff -ruN /usr/ports/security/nmap/files/patch-configure-cxxflags-fix ./files/patch-configure-cxxflags-fix >--- /usr/ports/security/nmap/files/patch-configure-cxxflags-fix 1970-01-01 03:00:00.000000000 +0300 >+++ ./files/patch-configure-cxxflags-fix 2012-10-05 10:16:50.000000000 +0400 >@@ -0,0 +1,11 @@ >+--- _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 >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 172358
: 128501