diff options
author | Christopher Friedt <cfriedt@meta.com> | 2022-11-24 20:13:21 -0500 |
---|---|---|
committer | Jens Geyer <Jens-G@users.noreply.github.com> | 2022-11-25 09:08:21 +0100 |
commit | 9c0de2d1eb343910213c62325f73e3bb72361c22 (patch) | |
tree | d739a1d22e8cb9c2cd28558a59e0e339e1fdd8e2 | |
parent | 850c61f6086f3a373de8c588c5b25d0ba37c3618 (diff) | |
download | thrift-9c0de2d1eb343910213c62325f73e3bb72361c22.tar.gz |
lib: c_glib: fix compile error due to missing unistd.h
Previously, the c_glib library tests failed to compile due
to implicit function declarationsn for `sleep()`, `fork()`,
and `alarm()`.
Include `<unistd.h>` to address all of those issues (on
platforms that have `<unistd.h>`).
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
-rw-r--r-- | lib/c_glib/test/testthrifttestclient.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp index b8d93095a..77daf3d37 100644 --- a/lib/c_glib/test/testthrifttestclient.cpp +++ b/lib/c_glib/test/testthrifttestclient.cpp @@ -19,6 +19,12 @@ /* test a C client with a C++ server (that makes sense...) */ +#include <thrift/config.h> + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + #include <signal.h> #include <sys/types.h> #include <sys/wait.h> |