1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

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
This commit is contained in:
Jan Beich 2018-01-26 15:17:02 +00:00
parent 31ab75204c
commit 9e3c4802ec
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=460008

View File

@ -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);
}