From 76aa0d9ee237d5ff3acd7b0f51cef7452eb70c7e Mon Sep 17 00:00:00 2001 From: Po-Chuan Hsieh Date: Thu, 30 May 2024 17:48:17 -0700 Subject: [PATCH] Fix build on FreeBSD (#12714) 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: https://github.com/facebook/rocksdb/pull/12714 Reviewed By: ajkr Differential Revision: D57970244 Pulled By: jaykorean fbshipit-source-id: afdad9af16b4bfe5e059bc82180f74b2c3260ed9 --- port/stack_trace.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/port/stack_trace.cc b/port/stack_trace.cc index f4909f91d5..ebbd4c1700 100644 --- a/port/stack_trace.cc +++ b/port/stack_trace.cc @@ -39,6 +39,7 @@ void* SaveStack(int* /*num_frames*/, int /*first_frames_to_skip*/) { #endif // OS_OPENBSD #ifdef OS_FREEBSD #include +#include #endif // OS_FREEBSD #ifdef OS_LINUX #include