From 780d328bf93e03e141dd21e5c543ec4ac7163d3f Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Fri, 31 Aug 2018 22:13:43 +0000 Subject: news/newscache: Fix build with Clang 6 NewsCache.cc:2265:62: error: invalid operands to binary expression ('__bind' 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 --- news/newscache/files/patch-src_NewsCache.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 news/newscache/files/patch-src_NewsCache.cc (limited to 'news/newscache/files/patch-src_NewsCache.cc') diff --git a/news/newscache/files/patch-src_NewsCache.cc b/news/newscache/files/patch-src_NewsCache.cc new file mode 100644 index 000000000000..d0d96168865f --- /dev/null +++ b/news/newscache/files/patch-src_NewsCache.cc @@ -0,0 +1,15 @@ +NewsCache.cc:2265:62: error: invalid operands to binary expression ('__bind' 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) << -- cgit v1.2.3