Thrift-1846:Restore socket.h header to support builds with Android NDK
authorJake Farrell <jfarrell@apache.org>
Tue, 2 Apr 2013 01:39:03 +0000 (21:39 -0400)
committerJake Farrell <jfarrell@apache.org>
Tue, 2 Apr 2013 01:39:03 +0000 (21:39 -0400)
Client: cpp
Patch: Nicolas Trésegnie

moves the <sys/socket.h> include from TSocket.h to the .cpp to minimize the risk of hidden dependencies.

lib/cpp/src/thrift/transport/TSocket.cpp
lib/cpp/src/thrift/transport/TSocket.h

index d2eb30e..e59f4a1 100644 (file)
@@ -22,6 +22,9 @@
 #endif
 #include <cstring>
 #include <sstream>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
 #ifdef HAVE_SYS_UN_H
 #include <sys/un.h>
 #endif
index ff5e541..b916a3e 100644 (file)
@@ -29,9 +29,6 @@
 #ifdef HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif