diff options
author | jbeich <jbeich@FreeBSD.org> | 2018-01-26 23:16:30 +0800 |
---|---|---|
committer | Koop Mast <kwm@rainbow-runner.nl> | 2018-02-04 06:29:38 +0800 |
commit | 7fefbebf7c322bbe977955574d39bd7b43490a2a (patch) | |
tree | cb827095ec25c72971e0e21a5b58d6d1865c2ab9 /games | |
parent | b175879b036bffde962ad8a62879c7449175f63b (diff) | |
download | freebsd-ports-gnome-7fefbebf7c322bbe977955574d39bd7b43490a2a.tar.gz freebsd-ports-gnome-7fefbebf7c322bbe977955574d39bd7b43490a2a.tar.zst freebsd-ports-gnome-7fefbebf7c322bbe977955574d39bd7b43490a2a.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
Diffstat (limited to 'games')
-rw-r--r-- | games/eboard/files/patch-c++11 | 17 |
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); + } |