mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-19 00:13:33 +00:00
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
This commit is contained in:
parent
287f7eacba
commit
9d652e8151
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=460006
17
games/eboard/files/patch-c++11
Normal file
17
games/eboard/files/patch-c++11
Normal file
@ -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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user