diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-10-27 12:13:03 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2011-10-27 12:13:03 +0200 |
commit | 408e980a83437ed621fa99ae0cd8d2bc6579f5ba (patch) | |
tree | 7f73587d84487f989bca966a22fc1c85c3f8397b /lib/tcp_socket.cc | |
parent | 7d8e6af2df12442c1c133956b3acf3fdbc496423 (diff) |
Fix warnings and error (due to bitrot)master-old
Diffstat (limited to 'lib/tcp_socket.cc')
-rw-r--r-- | lib/tcp_socket.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/tcp_socket.cc b/lib/tcp_socket.cc index 8468df9..7f2b3d9 100644 --- a/lib/tcp_socket.cc +++ b/lib/tcp_socket.cc @@ -46,6 +46,8 @@ #include <netinet/in.h> #include <arpa/inet.h> +#include <string.h> + TCPSocket::TCPSocket(int port, std::string addr) : Socket(port, addr) { sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); @@ -66,7 +68,7 @@ int TCPSocket::listen(TCPSocket *s) if(!connected) { struct sockaddr_in socketaddr; - memset((char *) &socketaddr, sizeof(socketaddr), 0); + memset((char *) &socketaddr, 0, sizeof(socketaddr)); socketaddr.sin_family = AF_INET; socketaddr.sin_port = htons(prt); socketaddr.sin_addr.s_addr = htonl(INADDR_ANY); |