cfriedt opened a new pull request, #2734:
URL: https://github.com/apache/thrift/pull/2734

   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 <cfri...@meta.com>
   
   
   ```
   testthrifttestclient.cpp: In member function 'virtual void 
TestHandler::testOneway(int)':
   testthrifttestclient.cpp:334:5: error: 'sleep' was not declared in this scope
   334 |     sleep(sleepFor);
           |     ^~~~~
   testthrifttestclient.cpp: In function 'void test_thrift_client()':
   testthrifttestclient.cpp:592:3: error: 'sleep' was not declared in this 
scope; did you mean 'g_usleep'?
       592 |   sleep (5);
               |   ^~~~~
               |   g_usleep
   testthrifttestclient.cpp: In function 'int main()':
   testthrifttestclient.cpp:616:13: error: 'fork' was not declared in this scope
       616 |   int pid = fork ();
              |             ^~~~
   testthrifttestclient.cpp:628:5: error: 'alarm' was not declared in this scope
       628 |     alarm (60);
               |     ^~~~~
   testthrifttestclient.cpp:631:5: error: 'sleep' was not declared in this 
scope; did you mean 'g_usleep'?
       631 |     sleep (1);
              |     ^~~~~
              |     g_usleep
   ```
   
   cc @Jens-G 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@thrift.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to