From 77d9f1b776f616492706661addb899eb8d600b4d Mon Sep 17 00:00:00 2001 From: Motalleb Fallahnezhad Date: Sat, 6 Jul 2024 09:51:27 +0330 Subject: [PATCH] fix: call undecleared waitpid function on linux When attempting to build a project on Debian Bookworm (unstable), an error is encountered in the file `flutter_pty/src/flutter_pty_unix.c` at line 114. The error message indicates that the function `waitpid` is undeclared and that ISO C99 and later versions do not support implicit function declarations. To resolve this issue, you can include the header file `` in the `flutter_pty_unix.c` file. This header file provides the declaration for the `waitpid` function. By adding `#include ` at the top of the file, the compiler will be able to recognize and use the `waitpid` function correctly, resolving the error. --- src/flutter_pty_unix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/flutter_pty_unix.c b/src/flutter_pty_unix.c index 8e6326e..829b8e5 100644 --- a/src/flutter_pty_unix.c +++ b/src/flutter_pty_unix.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "forkpty.h" #include "flutter_pty.h"