From 8f83e462502a57456ab726ac64ab4dc3ca4d9b00 Mon Sep 17 00:00:00 2001 From: Chris Friedt Date: Wed, 26 Oct 2022 20:17:01 -0400 Subject: THRIFT-5663: lib: cpp: usleep was not declared in this scope Several build failures in Travis resulted from an include-order problem in `TFileTransport.cpp`. It would probably be better to simply include the right header files in `PlatformSocket.h` but it's possible that might slow down compilation. ``` error: 'usleep' was not declared in this scope .. # define THRIFT_SLEEP_USEC usleep ``` Also fixing the same (potential) problem in `TFDTransport.cpp`. Signed-off-by: Chris Friedt --- lib/cpp/src/thrift/transport/TFDTransport.cpp | 6 +++--- lib/cpp/src/thrift/transport/TFileTransport.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/cpp/src/thrift/transport/TFDTransport.cpp b/lib/cpp/src/thrift/transport/TFDTransport.cpp index 0cadcb553..4e28c318b 100644 --- a/lib/cpp/src/thrift/transport/TFDTransport.cpp +++ b/lib/cpp/src/thrift/transport/TFDTransport.cpp @@ -20,9 +20,6 @@ #include #include -#include -#include - #ifdef HAVE_UNISTD_H #include #endif @@ -31,6 +28,9 @@ #include #endif +#include +#include + using std::string; namespace apache { diff --git a/lib/cpp/src/thrift/transport/TFileTransport.cpp b/lib/cpp/src/thrift/transport/TFileTransport.cpp index 3a24e3a22..dd7d22925 100644 --- a/lib/cpp/src/thrift/transport/TFileTransport.cpp +++ b/lib/cpp/src/thrift/transport/TFileTransport.cpp @@ -19,11 +19,6 @@ #include -#include -#include -#include -#include - #ifdef HAVE_SYS_TIME_H #include #else @@ -49,6 +44,11 @@ #include #endif +#include +#include +#include +#include + namespace apache { namespace thrift { namespace transport { -- cgit v1.2.1