mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-03 01:23:49 +00:00
devel/kaptain: Fix build with Clang 6
communication.cpp:108:32: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned int>' and 'int') sizeof (struct sockaddr)) == -1) ~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~ http://beefy11.nyi.freebsd.org/data/head-i386-default/p477696_s338122/logs/errors/kaptain-0.73.log
This commit is contained in:
parent
da1e79c1d5
commit
0d96a09b79
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=478159
15
devel/kaptain/files/patch-communication.cpp
Normal file
15
devel/kaptain/files/patch-communication.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
communication.cpp:108:32: error: invalid operands to binary expression ('__bind<int &, sockaddr *, unsigned int>' and 'int')
|
||||
sizeof (struct sockaddr)) == -1)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~
|
||||
|
||||
--- communication.cpp.orig 2018-08-26 18:50:21 UTC
|
||||
+++ communication.cpp
|
||||
@@ -104,7 +104,7 @@ bool Communicator::setup_socket_server(string port_str
|
||||
memset(&(my_addr.sin_zero), '\0', 8); // zero the rest of the struct
|
||||
|
||||
/* bind */
|
||||
- if (bind(socket_fd, (struct sockaddr *)&my_addr,
|
||||
+ if (::bind(socket_fd, (struct sockaddr *)&my_addr,
|
||||
sizeof (struct sockaddr)) == -1)
|
||||
{
|
||||
MAKE_ERROR(string("bind: ")+string(strerror(errno))+string(".\n"));
|
Loading…
Reference in New Issue
Block a user