svn commit: r477991 - head/benchmarks/postal/files
Tobias Kortkamp
tobik at FreeBSD.org
Sat Aug 25 03:06:46 UTC 2018
Author: tobik
Date: Sat Aug 25 03:06:45 2018
New Revision: 477991
URL: https://svnweb.freebsd.org/changeset/ports/477991
Log:
benchmarks/postal: Fix build with Clang 6
bhm.cpp:420:25: error: value of type '__bind<int &, sockaddr *, unsigned long>' is
not contextually convertible to 'bool'
if(listen_fd == -1 || bind(listen_fd, (sockaddr *)&in, sizeof(in))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bhm.cpp:420:22: error: invalid operands to binary expression ('bool' and '__bind<int
&, sockaddr *, unsigned long>')
if(listen_fd == -1 || bind(listen_fd, (sockaddr *)&in, sizeof(in))
http://beefy11.nyi.freebsd.org/data/head-i386-default/p477696_s338122/logs/errors/postal-0.73_3.log
Modified:
head/benchmarks/postal/files/patch-bhm.cpp
Modified: head/benchmarks/postal/files/patch-bhm.cpp
==============================================================================
--- head/benchmarks/postal/files/patch-bhm.cpp Sat Aug 25 03:03:09 2018 (r477990)
+++ head/benchmarks/postal/files/patch-bhm.cpp Sat Aug 25 03:06:45 2018 (r477991)
@@ -44,7 +44,7 @@
int exitCount = 0;
-@@ -261,7 +259,7 @@ int readCommand(base_tcp &t, char *buf,
+@@ -261,7 +259,7 @@ int readCommand(base_tcp &t, char *buf, int bufSize, b
void do_work(thread_data *td)
{
@@ -62,3 +62,12 @@
Logit *debug = NULL;
if(debugName)
+@@ -419,7 +417,7 @@ int main(int argc, char **argv)
+ in.sin_family = AF_INET;
+ in.sin_port = htons(port);
+ in.sin_addr.s_addr = INADDR_ANY;
+- if(listen_fd == -1 || bind(listen_fd, (sockaddr *)&in, sizeof(in))
++ if(listen_fd == -1 || ::bind(listen_fd, (sockaddr *)&in, sizeof(in))
+ || listen(listen_fd, 10))
+ {
+ fprintf(stderr, "Can't bind to port.\n");
More information about the svn-ports-all
mailing list