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>
diff --git a/lib/c_glib/test/testthrifttestclient.cpp b/lib/c_glib/test/testthrifttestclient.cpp
index b8d9309..77daf3d 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>