Include <cstring> and use "std::" for memset in T[Server]Socket.cpp.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666498 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/transport/TSocket.cpp b/lib/cpp/src/transport/TSocket.cpp
index 3566253..34ab1c8 100644
--- a/lib/cpp/src/transport/TSocket.cpp
+++ b/lib/cpp/src/transport/TSocket.cpp
@@ -5,6 +5,8 @@
// http://developers.facebook.com/thrift/
#include <config.h>
+#include <cstring>
+#include <sstream>
#include <sys/socket.h>
#include <sys/poll.h>
#include <sys/types.h>
@@ -15,7 +17,6 @@
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
-#include <sstream>
#include "concurrency/Monitor.h"
#include "TSocket.h"
@@ -166,7 +167,7 @@
struct pollfd fds[1];
- memset(fds, 0 , sizeof(fds));
+ std::memset(fds, 0 , sizeof(fds));
fds[0].fd = socket_;
fds[0].events = POLLOUT;
ret = poll(fds, 1, connTimeout_);
@@ -223,7 +224,7 @@
res0 = NULL;
int error;
char port[sizeof("65536")];
- memset(&hints, 0, sizeof(hints));
+ std::memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE | AI_ADDRCONFIG;