From 9d652e8151687f4f117037d53cc19d8f3085e40d Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 26 Jan 2018 15:16:30 +0000 Subject: [PATCH] games/eboard: unbreak build with Clang 6 (C++14 by default) libc++ doesn't like "using namespace std" in C++11 network.cc:466:59: error: invalid operands to binary expression ('__bind' and 'int') if (bind(netsocket,(struct sockaddr *) &sin,sizeof(sin))==-1) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~ Reported by: pkg-fallout Approved by: portmgr blanket --- games/eboard/files/patch-c++11 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 games/eboard/files/patch-c++11 diff --git a/games/eboard/files/patch-c++11 b/games/eboard/files/patch-c++11 new file mode 100644 index 000000000000..68b47b914a39 --- /dev/null +++ b/games/eboard/files/patch-c++11 @@ -0,0 +1,17 @@ +libc++ doesn't like "using namespace std" in C++11 + +network.cc:466:59: error: invalid operands to binary expression ('__bind' and 'int') + if (bind(netsocket,(struct sockaddr *) &sin,sizeof(sin))==-1) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~ + +--- network.cc.orig 2008-02-22 15:51:22 UTC ++++ network.cc +@@ -463,7 +463,7 @@ int IncomingConnection::createSocket() { + sin.sin_addr.s_addr = INADDR_ANY; + sin.sin_port = htons(Port); + +- if (bind(netsocket,(struct sockaddr *) &sin,sizeof(sin))==-1) { ++ if (::bind(netsocket,(struct sockaddr *) &sin,sizeof(sin))==-1) { + snprintf(errorMessage,128,_("Unable to bind on port %d."),Port); + return(-1); + }