diff options
author | Frédéric Brière <fbriere@fbriere.net> | 2016-10-05 19:53:54 -0400 |
---|---|---|
committer | Frédéric Brière <fbriere@fbriere.net> | 2018-02-09 13:12:00 -0500 |
commit | 1082c44de0fadd3eb45a697c55c9b67603ae7a19 (patch) | |
tree | f40b852e475f1f35c9475dd295c8c3d3eb36c5e7 | |
parent | 3ba5150d0fbc8f88deebd20fc5ac591209444f22 (diff) | |
download | twinkle-1082c44de0fadd3eb45a697c55c9b67603ae7a19.tar twinkle-1082c44de0fadd3eb45a697c55c9b67603ae7a19.tar.gz twinkle-1082c44de0fadd3eb45a697c55c9b67603ae7a19.tar.lz twinkle-1082c44de0fadd3eb45a697c55c9b67603ae7a19.tar.xz twinkle-1082c44de0fadd3eb45a697c55c9b67603ae7a19.zip |
Disambiguate reference to ::bind()
There's a potential ambiguity between ::bind() and std::bind() if
<functional> happens to be included beforehand (as is the case with
libc++).
-rw-r--r-- | src/sockets/socket.cpp | 6 | ||||
-rw-r--r-- | src/stun/udp.cxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/sockets/socket.cpp b/src/sockets/socket.cpp index dc9b862..2d828dd 100644 --- a/src/sockets/socket.cpp +++ b/src/sockets/socket.cpp @@ -86,7 +86,7 @@ t_socket_udp::t_socket_udp() { addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(0); - ret = bind(sd, (struct sockaddr *)&addr, sizeof(addr)); + ret = ::bind(sd, (struct sockaddr *)&addr, sizeof(addr)); if (ret < 0) throw errno; } @@ -100,7 +100,7 @@ t_socket_udp::t_socket_udp(unsigned short port) { addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(port); - ret = bind(sd, (struct sockaddr *)&addr, sizeof(addr)); + ret = ::bind(sd, (struct sockaddr *)&addr, sizeof(addr)); if (ret < 0) throw errno; } @@ -295,7 +295,7 @@ t_socket_tcp::t_socket_tcp(unsigned short port) { addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_ANY); addr.sin_port = htons(port); - ret = bind(sd, (struct sockaddr *)&addr, sizeof(addr)); + ret = ::bind(sd, (struct sockaddr *)&addr, sizeof(addr)); if (ret < 0) throw errno; } diff --git a/src/stun/udp.cxx b/src/stun/udp.cxx index 7a75134..1472b13 100644 --- a/src/stun/udp.cxx +++ b/src/stun/udp.cxx @@ -64,7 +64,7 @@ openPort( unsigned short port, unsigned int interfaceIp, bool verbose ) } } - if ( bind( fd,(struct sockaddr*)&addr, sizeof(addr)) != 0 ) + if ( ::bind( fd,(struct sockaddr*)&addr, sizeof(addr)) != 0 ) { int e = getErrno(); |