Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 Aug 2018 22:13:43 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r478614 - head/news/newscache/files
Message-ID:  <201808312213.w7VMDhmc074445@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Fri Aug 31 22:13:43 2018
New Revision: 478614
URL: https://svnweb.freebsd.org/changeset/ports/478614

Log:
  news/newscache: Fix build with Clang 6
  
  NewsCache.cc:2265:62: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned int>' and 'int')
          if (bind(sock, (struct sockaddr *) &nproxy, sizeof(nproxy)) < 0) {
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
  
  http://beefy11.nyi.freebsd.org/data/head-i386-default/p478276_s338342/logs/errors/newscache-1.2.r.6_4.log

Added:
  head/news/newscache/files/patch-src_NewsCache.cc   (contents, props changed)

Added: head/news/newscache/files/patch-src_NewsCache.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/news/newscache/files/patch-src_NewsCache.cc	Fri Aug 31 22:13:43 2018	(r478614)
@@ -0,0 +1,15 @@
+NewsCache.cc:2265:62: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned int>' and 'int')
+        if (bind(sock, (struct sockaddr *) &nproxy, sizeof(nproxy)) < 0) {
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
+
+--- src/NewsCache.cc.orig	2018-08-31 22:11:06 UTC
++++ src/NewsCache.cc
+@@ -2262,7 +2262,7 @@ void nntpd()
+ 		}
+ 	}			/* end create socket and set some socket options */
+ 
+-	if (bind(sock, (struct sockaddr *) &nproxy, sizeof(nproxy)) < 0) {
++	if (::bind(sock, (struct sockaddr *) &nproxy, sizeof(nproxy)) < 0) {
+ 		slog.
+ 		    p(Logger::
+ 		      Error) << "can't bind socket: " << strerror(errno) <<



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