diff options
author | jbeich <jbeich@FreeBSD.org> | 2018-01-26 23:17:02 +0800 |
---|---|---|
committer | Koop Mast <kwm@rainbow-runner.nl> | 2018-02-04 06:29:39 +0800 |
commit | ba9ba632cba7c91e8ab8f066565b444aaf063aa4 (patch) | |
tree | a603edd6bf0d3f777311a8a5e2b5eef53252add8 /games | |
parent | a117461eff677c4bed54e831738298b0bae65a0f (diff) | |
download | freebsd-ports-gnome-ba9ba632cba7c91e8ab8f066565b444aaf063aa4.tar.gz freebsd-ports-gnome-ba9ba632cba7c91e8ab8f066565b444aaf063aa4.tar.zst freebsd-ports-gnome-ba9ba632cba7c91e8ab8f066565b444aaf063aa4.zip |
games/crack-attack: unbreak build with Clang 6 (C++14 by default)
libc++ doesn't like "using namespace std" in C++11
Communicator.cxx:139:73: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned long>' and 'int')
if (bind(connection_socket, (sockaddr *) &address, sizeof(address)) < 0) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
Reported by: pkg-fallout
Approved by: portmgr blanket
Diffstat (limited to 'games')
-rw-r--r-- | games/crack-attack/files/patch-src_Communicator.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/games/crack-attack/files/patch-src_Communicator.cxx b/games/crack-attack/files/patch-src_Communicator.cxx new file mode 100644 index 000000000000..036df0235fcd --- /dev/null +++ b/games/crack-attack/files/patch-src_Communicator.cxx @@ -0,0 +1,17 @@ +libc++ doesn't like "using namespace std" in C++11 + +Communicator.cxx:139:73: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned long>' and 'int') + if (bind(connection_socket, (sockaddr *) &address, sizeof(address)) < 0) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ + +--- src/Communicator.cxx.orig 2005-04-16 08:13:38 UTC ++++ src/Communicator.cxx +@@ -136,7 +136,7 @@ void Communicator::initialize ( int mode, int port, ch + address.sin_addr.s_addr = htonl(INADDR_ANY); + address.sin_port = htons(port); + +- if (bind(connection_socket, (sockaddr *) &address, sizeof(address)) < 0) { ++ if (::bind(connection_socket, (sockaddr *) &address, sizeof(address)) < 0) { + cerr << "Port " << port << " is busy." << endl; + exit(1); + } |