Skip to content

Commit

Permalink
Fix build on FreeBSD (facebook#12714)
Browse files Browse the repository at this point in the history
Summary:
The error message is as follows:
```
port/stack_trace.cc:286:7: error: use of undeclared identifier 'waitpid'
      waitpid(child_pid, &wstatus, 0);
      ^
port/stack_trace.cc:287:11: error: use of undeclared identifier 'WIFEXITED'
      if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) == EXIT_SUCCESS) {
          ^
port/stack_trace.cc:287:33: error: use of undeclared identifier 'WEXITSTATUS'
      if (WIFEXITED(wstatus) && WEXITSTATUS(wstatus) == EXIT_SUCCESS) {
                                ^
3 errors generated.
```

Pull Request resolved: facebook#12714

Reviewed By: ajkr

Differential Revision: D57970244

Pulled By: jaykorean

fbshipit-source-id: afdad9af16b4bfe5e059bc82180f74b2c3260ed9
  • Loading branch information
sunpoet authored and facebook-github-bot committed May 31, 2024
1 parent 8a462ee commit 76aa0d9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions port/stack_trace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ void* SaveStack(int* /*num_frames*/, int /*first_frames_to_skip*/) {
#endif // OS_OPENBSD
#ifdef OS_FREEBSD
#include <sys/sysctl.h>
#include <sys/wait.h>
#endif // OS_FREEBSD
#ifdef OS_LINUX
#include <sys/prctl.h>
Expand Down

0 comments on commit 76aa0d9

Please sign in to comment.