From owner-svn-ports-all@freebsd.org Fri Jan 26 15:16:49 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD2F5EDB9BE; Fri, 26 Jan 2018 15:16:48 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6F039779AB; Fri, 26 Jan 2018 15:16:48 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 69DB91D3FE; Fri, 26 Jan 2018 15:16:48 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0QFGmoS024098; Fri, 26 Jan 2018 15:16:48 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0QFGmD3024096; Fri, 26 Jan 2018 15:16:48 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201801261516.w0QFGmD3024096@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Fri, 26 Jan 2018 15:16:48 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r460007 - head/games/xevil/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/games/xevil/files X-SVN-Commit-Revision: 460007 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2018 15:16:49 -0000 Author: jbeich Date: Fri Jan 26 15:16:48 2018 New Revision: 460007 URL: https://svnweb.freebsd.org/changeset/ports/460007 Log: games/xevil: unbreak build with Clang 6 (C++14 by default) libc++ doesn't like "using namespace std" in C++11 role.cpp:656:62: error: invalid operands to binary expression ('__bind' and 'int') if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) >= 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ role.cpp:1829:70: error: invalid operands to binary expression ('__bind' and 'int') if (bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ role.cpp:1836:70: error: invalid operands to binary expression ('__bind' and 'int') if (bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ serverping.cpp:173:60: error: invalid operands to binary expression ('__bind' and 'int') if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) < 0) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ Reported by: pkg-fallout Modified: head/games/xevil/files/patch-cmn__role.cpp (contents, props changed) head/games/xevil/files/patch-x11__serverping.cpp (contents, props changed) Modified: head/games/xevil/files/patch-cmn__role.cpp ============================================================================== --- head/games/xevil/files/patch-cmn__role.cpp Fri Jan 26 15:16:30 2018 (r460006) +++ head/games/xevil/files/patch-cmn__role.cpp Fri Jan 26 15:16:48 2018 (r460007) @@ -82,7 +82,14 @@ // Probably would be better to use Role::message(), but we want it to stay // up for a long time. Should add argument to Role::message(). -@@ -663,12 +659,10 @@ +@@ -657,18 +653,16 @@ void Client::connect_server() { + client.sin_family = AF_INET; + client.sin_addr.s_addr = htonl(INADDR_ANY); + client.sin_port = htons((u_short)(clientPortBase + n)); +- if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) >= 0) { ++ if (::bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) >= 0) { + // Success. + break; } } if (n == CLIENT_PORT_TRIES) { @@ -247,11 +254,13 @@ // Hack, using errLocator for more than reporting errors. errLocator->set_remember_deleted(True); errLocator->set_remember_sounds(True); -@@ -1843,19 +1827,17 @@ +@@ -1842,20 +1826,18 @@ void Server::run() { + serverAddr.sin_port = htons(port); // Give address to both the TCP and UDP sockets. - if (bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { +- if (bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { - ostrstream str; ++ if (::bind(tcpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { + stringstream str; str << "Couldn't bind socket name to TCP socket on port " - << port << "." << ends; @@ -261,8 +270,9 @@ + error(str.str().c_str()); return; } - if (bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { +- if (bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { - ostrstream str; ++ if (::bind(udpSock, (CMN_SOCKADDR *)&serverAddr, sizeof(serverAddr)) < 0) { + stringstream str; str << "Couldn't bind socket name to UDP socket on port " - << port << "." << ends; Modified: head/games/xevil/files/patch-x11__serverping.cpp ============================================================================== --- head/games/xevil/files/patch-x11__serverping.cpp Fri Jan 26 15:16:30 2018 (r460006) +++ head/games/xevil/files/patch-x11__serverping.cpp Fri Jan 26 15:16:48 2018 (r460007) @@ -41,14 +41,16 @@ // Create server address. memset((void *)&serverAddr,'\0',sizeof(serverAddr)); -@@ -171,10 +171,9 @@ +@@ -170,11 +170,10 @@ ServerPing::ServerPing(int argc,char** argv) { + client.sin_family = AF_INET; client.sin_addr.s_addr = htonl(INADDR_ANY); client.sin_port = htons((u_short)clientPort); - if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) < 0) { +- if (bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) < 0) { - ostrstream str; - str << "Could not bind local UDP port " << clientPort << ends; - error(str.str()); - delete str.str(); ++ if (::bind(udpSock,(CMN_SOCKADDR *)&client,sizeof(client)) < 0) { + stringstream str; + str << "Could not bind local UDP port " << clientPort; + error(str.str().c_str());