Date: Thu, 27 Dec 2018 08:51:32 +0000 (UTC) From: Li-Wen Hsu <lwhsu@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r488514 - head/security/nmap/files Message-ID: <201812270851.wBR8pWUk047700@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lwhsu Date: Thu Dec 27 08:51:32 2018 New Revision: 488514 URL: https://svnweb.freebsd.org/changeset/ports/488514 Log: - Fix build with libc++ 7.0 PR: 232934 Submitted by: dim Approved by: maintainer timeout Sponsored by: The FreeBSD Foundation Added: head/security/nmap/files/patch-nping_EchoServer.cc (contents, props changed) Added: head/security/nmap/files/patch-nping_EchoServer.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/nmap/files/patch-nping_EchoServer.cc Thu Dec 27 08:51:32 2018 (r488514) @@ -0,0 +1,32 @@ +--- nping/EchoServer.cc.orig 2018-01-28 21:18:17 UTC ++++ nping/EchoServer.cc +@@ -281,12 +281,12 @@ int EchoServer::nep_listen_socket(){ + server_addr6.sin6_len = sizeof(struct sockaddr_in6); + #endif + /* Bind to local address and the specified port */ +- if( bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){ ++ if( ::bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){ + nping_warning(QT_3, "Failed to bind to source address %s. Trying to bind to port %d...", IPtoa(server_addr6.sin6_addr), port); + /* If the bind failed for the supplied address, just try again with in6addr_any */ + if( o.spoofSource() ){ + server_addr6.sin6_addr = in6addr_any; +- if( bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){ ++ if( ::bind(master_sd, (struct sockaddr *)&server_addr6, sizeof(server_addr6)) != 0 ){ + nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno)); + }else{ + nping_print(VB_1, "Server bound to port %d", port); +@@ -319,12 +319,12 @@ int EchoServer::nep_listen_socket(){ + #endif + + /* Bind to local address and the specified port */ +- if( bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){ ++ if( ::bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){ + nping_warning(QT_3, "Failed to bind to source address %s. Trying to bind to port %d...", IPtoa(server_addr4.sin_addr), port); + /* If the bind failed for the supplied address, just try again with in6addr_any */ + if( o.spoofSource() ){ + server_addr4.sin_addr.s_addr=INADDR_ANY; +- if( bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){ ++ if( ::bind(master_sd, (struct sockaddr *)&server_addr4, sizeof(server_addr4)) != 0 ){ + nping_fatal(QT_3, "Could not bind to port %d (%s).", port, strerror(errno)); + }else{ + nping_print(VB_1, "Server bound to port %d", port);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812270851.wBR8pWUk047700>