THRIFT-3099 cmake build is broken on FreeBSD
diff --git a/lib/cpp/test/TransportTest.cpp b/lib/cpp/test/TransportTest.cpp
index 451fcef..7bd8aa0 100644
--- a/lib/cpp/test/TransportTest.cpp
+++ b/lib/cpp/test/TransportTest.cpp
@@ -16,8 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
+
+#include "config.h"
+
#include <stdlib.h>
#include <time.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
#include <sstream>
#include <fstream>
#include <thrift/cxxfunctional.h>