TerminalStudio / flutter_pty

Pty for Flutter. Provides the ability to create processes with pseudo terminal file descriptors.
https://pub.dev/packages/flutter_pty
MIT License
24 stars 21 forks source link

fix: call undecleared waitpid function on linux #16

Open FMotalleb opened 4 months ago

FMotalleb commented 4 months ago

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 <sys/wait.h> in the flutter_pty_unix.c file. This header file provides the declaration for the waitpid function.

By adding #include <sys/wait.h> at the top of the file, the compiler will be able to recognize and use the waitpid function correctly, resolving the error.