summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-11-29 10:52:07 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-11-29 10:52:07 +0200
commitc707e00195f1035ae535f3fc8697af42e73190c0 (patch)
tree0e3c2553bb4726821e49dad599f64ecb5b3cec96 /src/socket.cpp
parente8fd5eb8eebbf12b0561d385ef8bc245d87e9ea6 (diff)
downloadminetest-c707e00195f1035ae535f3fc8697af42e73190c0.tar.gz
minetest-c707e00195f1035ae535f3fc8697af42e73190c0.tar.bz2
minetest-c707e00195f1035ae535f3fc8697af42e73190c0.zip
sitä sun tätä tekeillä, toimii kivasti
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 91b2ef73a..88ba78c6a 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -164,7 +164,9 @@ void UDPSocket::Bind(unsigned short port)
if(bind(m_handle, (const sockaddr*)&address, sizeof(sockaddr_in)) < 0)
{
+#ifndef DISABLE_ERRNO
dstream<<(int)m_handle<<": Bind failed: "<<strerror(errno)<<std::endl;
+#endif
throw SocketException("Failed to bind socket");
}
}
@@ -291,7 +293,9 @@ bool UDPSocket::WaitData(int timeout_ms)
}
else if(result < 0){
// Error
+#ifndef DISABLE_ERRNO
dstream<<(int)m_handle<<": Select failed: "<<strerror(errno)<<std::endl;
+#endif
#ifdef _WIN32
dstream<<(int)m_handle<<": WSAGetLastError()="<<WSAGetLastError()<<std::endl;
#endif