aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2018-01-26 23:16:30 +0800
committerjbeich <jbeich@FreeBSD.org>2018-01-26 23:16:30 +0800
commitcc47ba5cddd398627f8c62f4d1f61a6dd13c7956 (patch)
tree20b577a212c36b7874396fb0f8b10eea3c19152e
parent798b6ad02503712fbfdf23bc61bc294ae992e5fe (diff)
downloadfreebsd-ports-gnome-cc47ba5cddd398627f8c62f4d1f61a6dd13c7956.tar.gz
freebsd-ports-gnome-cc47ba5cddd398627f8c62f4d1f61a6dd13c7956.tar.zst
freebsd-ports-gnome-cc47ba5cddd398627f8c62f4d1f61a6dd13c7956.zip
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<int &, sockaddr *, unsigned long>' and 'int') if (bind(netsocket,(struct sockaddr *) &sin,sizeof(sin))==-1) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ ~~ Reported by: pkg-fallout Approved by: portmgr blanket
-rw-r--r--games/eboard/files/patch-c++1117
1 files changed, 17 insertions, 0 deletions
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<int &, sockaddr *, unsigned long>' 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);
+ }