diff options
author | Simon South <simon@simonsouth.com> | 2015-12-21 13:01:03 -0500 |
---|---|---|
committer | Nobuaki Sukegawa <nsuke@apache.org> | 2015-12-24 02:11:17 +0900 |
commit | 1719bf41b8015cef892e18db7f5ed0e6c496139d (patch) | |
tree | 8b23db96c9edcd4b08bbb697439ae1143c8ef5df /lib/cpp | |
parent | a873e1609724d51a89ac07f03c1e96531866e2ea (diff) | |
download | thrift-1719bf41b8015cef892e18db7f5ed0e6c496139d.tar.gz |
THRIFT-3497 Build fails with "invalid use of incomplete type"
Client: C++
Patch: Simon South
- Monitor.cpp: Include thrift-config.h for definition of
HAVE_SYS_TIME_H
- Monitor.h: Explicitly include sys/time.h on platforms that require
this
This closes #753
Diffstat (limited to 'lib/cpp')
-rw-r--r-- | lib/cpp/src/thrift/concurrency/Monitor.cpp | 2 | ||||
-rw-r--r-- | lib/cpp/src/thrift/concurrency/Monitor.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/cpp/src/thrift/concurrency/Monitor.cpp b/lib/cpp/src/thrift/concurrency/Monitor.cpp index 5e713c0a7..5969e4a45 100644 --- a/lib/cpp/src/thrift/concurrency/Monitor.cpp +++ b/lib/cpp/src/thrift/concurrency/Monitor.cpp @@ -17,6 +17,8 @@ * under the License. */ +#include <thrift/thrift-config.h> + #include <thrift/concurrency/Monitor.h> #include <thrift/concurrency/Exception.h> #include <thrift/concurrency/Util.h> diff --git a/lib/cpp/src/thrift/concurrency/Monitor.h b/lib/cpp/src/thrift/concurrency/Monitor.h index 5472f85b8..2399a9879 100644 --- a/lib/cpp/src/thrift/concurrency/Monitor.h +++ b/lib/cpp/src/thrift/concurrency/Monitor.h @@ -20,6 +20,10 @@ #ifndef _THRIFT_CONCURRENCY_MONITOR_H_ #define _THRIFT_CONCURRENCY_MONITOR_H_ 1 +#ifdef HAVE_SYS_TIME_H +#include <sys/time.h> +#endif + #include <thrift/concurrency/Exception.h> #include <thrift/concurrency/Mutex.h> |