diff options
author | Tobias Kortkamp <tobik@FreeBSD.org> | 2018-08-25 03:06:45 +0000 |
---|---|---|
committer | Tobias Kortkamp <tobik@FreeBSD.org> | 2018-08-25 03:06:45 +0000 |
commit | 0560213a4491a5ca67d12123f7a959e98f3a73be (patch) | |
tree | 3e8297f980b8938c91451f72600be9ff07a71553 /benchmarks | |
parent | 557b62a1e5fdcfa68e37611e15d8fa94f4286b48 (diff) | |
download | ports-0560213a4491a5ca67d12123f7a959e98f3a73be.tar.gz ports-0560213a4491a5ca67d12123f7a959e98f3a73be.zip |
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
Notes
Notes:
svn path=/head/; revision=477991
Diffstat (limited to 'benchmarks')
-rw-r--r-- | benchmarks/postal/files/patch-bhm.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/benchmarks/postal/files/patch-bhm.cpp b/benchmarks/postal/files/patch-bhm.cpp index 834d70062764..7d49a99c97a4 100644 --- a/benchmarks/postal/files/patch-bhm.cpp +++ b/benchmarks/postal/files/patch-bhm.cpp @@ -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"); |