Received: by mail.netbsd.org (Postfix, from userid 605) id 1C13884E1C; Wed, 18 Mar 2020 17:58:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 98F8184E1B for ; Wed, 18 Mar 2020 17:58:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id du2WTwHunK1l for ; Wed, 18 Mar 2020 17:58:44 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 1234284D9A for ; Wed, 18 Mar 2020 17:58:44 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 103E7FB27; Wed, 18 Mar 2020 17:58:44 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_158455432479960" MIME-Version: 1.0 Date: Wed, 18 Mar 2020 17:58:44 +0000 From: "Joerg Sonnenberger" Subject: CVS commit: pkgsrc/net/nmap To: pkgsrc-changes@NetBSD.org Reply-To: joerg@netbsd.org X-Mailer: log_accum Message-Id: <20200318175844.103E7FB27@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_158455432479960 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: joerg Date: Wed Mar 18 17:58:43 UTC 2020 Modified Files: pkgsrc/net/nmap: distinfo Added Files: pkgsrc/net/nmap/patches: patch-nping_EchoServer.cc Log Message: Help the compiler find the right bind To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 pkgsrc/net/nmap/distinfo cvs rdiff -u -r0 -r1.1 pkgsrc/net/nmap/patches/patch-nping_EchoServer.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_158455432479960 Content-Disposition: inline Content-Length: 3514 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/net/nmap/distinfo diff -u pkgsrc/net/nmap/distinfo:1.78 pkgsrc/net/nmap/distinfo:1.79 --- pkgsrc/net/nmap/distinfo:1.78 Wed Aug 28 13:55:44 2019 +++ pkgsrc/net/nmap/distinfo Wed Mar 18 17:58:43 2020 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.78 2019/08/28 13:55:44 adam Exp $ +$NetBSD: distinfo,v 1.79 2020/03/18 17:58:43 joerg Exp $ SHA1 (nmap-7.80.tar.bz2) = cfd8162192cfe2623f5770b8ed3c6237791ff6bf RMD160 (nmap-7.80.tar.bz2) = f9e2a71733fd25db98681286c9c2bf23d41bdd71 @@ -7,4 +7,5 @@ Size (nmap-7.80.tar.bz2) = 10550327 byte SHA1 (patch-configure) = 5fc39f084eadd6ea0560cd8e6f52074113566600 SHA1 (patch-libdnet-stripped_src_arp-bsd.c) = c56c4e70eca2fa04dd8aab38ed2c3f4cac83f5e3 SHA1 (patch-libnetutil_netutil.cc) = 7bd1059d6cbcf4f6d129730d6c6f6bc3ab54c0a0 +SHA1 (patch-nping_EchoServer.cc) = e5b0213e3cfff8a32b5ae291c1921a86b9b17dd3 SHA1 (patch-nsock_tests_run__tests.sh) = 88a7447f93dd3377e7e24e317c55528a73a17401 Added files: Index: pkgsrc/net/nmap/patches/patch-nping_EchoServer.cc diff -u /dev/null pkgsrc/net/nmap/patches/patch-nping_EchoServer.cc:1.1 --- /dev/null Wed Mar 18 17:58:44 2020 +++ pkgsrc/net/nmap/patches/patch-nping_EchoServer.cc Wed Mar 18 17:58:43 2020 @@ -0,0 +1,36 @@ +$NetBSD: patch-nping_EchoServer.cc,v 1.1 2020/03/18 17:58:43 joerg Exp $ + +Don't match std::bind. + +--- nping/EchoServer.cc.orig 2020-03-18 16:55:31.850840039 +0000 ++++ 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); --_----------=_158455432479960--