svn commit: r460008 - head/games/crack-attack/files

Jan Beich jbeich at FreeBSD.org
Fri Jan 26 15:17:03 UTC 2018


Author: jbeich
Date: Fri Jan 26 15:17:02 2018
New Revision: 460008
URL: https://svnweb.freebsd.org/changeset/ports/460008

Log:
  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

Added:
  head/games/crack-attack/files/patch-src_Communicator.cxx   (contents, props changed)

Added: head/games/crack-attack/files/patch-src_Communicator.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/crack-attack/files/patch-src_Communicator.cxx	Fri Jan 26 15:17:02 2018	(r460008)
@@ -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);
+     }


More information about the svn-ports-head mailing list