Skip to content

Commit a762cc2

Browse files
authored
[flang] include sys/wait.h for EXECUTE_COMMAND_LINE (#77675)
Linux defines WEXITSTATUS in stdlib.h, but at least FreeBSD and NetBSD only define it in sys/wait.h. Include this header unconditionally, since it is required on the BSDs and should be harmless on other platforms. Fixes FreeBSD build after #74077.
1 parent 35c19fd commit a762cc2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flang/runtime/execute.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <windows.h>
2222
#else
2323
#include <signal.h>
24+
#include <sys/wait.h>
2425
#include <unistd.h>
2526
#endif
2627

0 commit comments

Comments
 (0)