Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jan 2018 15:16:30 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r460006 - head/games/eboard/files
Message-ID:  <201801261516.w0QFGU4S023972@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Jan 26 15:16:30 2018
New Revision: 460006
URL: https://svnweb.freebsd.org/changeset/ports/460006

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

Added:
  head/games/eboard/files/patch-c++11   (contents, props changed)

Added: head/games/eboard/files/patch-c++11
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/games/eboard/files/patch-c++11	Fri Jan 26 15:16:30 2018	(r460006)
@@ -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);
+   }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801261516.w0QFGU4S023972>