You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by GitBox <gi...@apache.org> on 2022/11/25 01:24:23 UTC

[GitHub] [thrift] cfriedt opened a new pull request, #2734: lib: c_glib: fix compile error due to missing unistd.h

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 <cf...@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-unsubscribe@thrift.apache.org

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


[GitHub] [thrift] Jens-G merged pull request #2734: lib: c_glib: fix compile error due to missing unistd.h

Posted by GitBox <gi...@apache.org>.
Jens-G merged PR #2734:
URL: https://github.com/apache/thrift/pull/2734


-- 
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-unsubscribe@thrift.apache.org

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