diff options
author | Luboš Doležel <lubos@dolezel.info> | 2018-02-09 20:27:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-09 20:27:17 +0100 |
commit | efa79d8bf2b8757b4e7dcff99d58f45018579059 (patch) | |
tree | f40b852e475f1f35c9475dd295c8c3d3eb36c5e7 | |
parent | 3ba5150d0fbc8f88deebd20fc5ac591209444f22 (diff) | |
parent | 1082c44de0fadd3eb45a697c55c9b67603ae7a19 (diff) | |
download | twinkle-efa79d8bf2b8757b4e7dcff99d58f45018579059.tar twinkle-efa79d8bf2b8757b4e7dcff99d58f45018579059.tar.gz twinkle-efa79d8bf2b8757b4e7dcff99d58f45018579059.tar.lz twinkle-efa79d8bf2b8757b4e7dcff99d58f45018579059.tar.xz twinkle-efa79d8bf2b8757b4e7dcff99d58f45018579059.zip |
Merge pull request #107 from fbriere/bug/bind-is-ambiguous
Disambiguate reference to ::bind()
-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(); |