On Wed, Nov 29, 2023 at 02:46:10PM +0100, Stefano Brivio wrote:lseek() is declared in unistd.h, and stdio.h provides sscanf(). Include these two headers in port_fwd.c. SIGCHLD, even if used exclusively for clone(), is defined in signal.h: add the include to util.h, as NS_CALL needs it.In theory the clang-tidy warnings I recently suppressed for ensuring we *directly* include the things we need would help avoid problems like this. Unfortunately it generates too many dumb warnings to be usable. I guess to do this correctly a checker would need to know the official/standardised header for every libc function, and require you to include that, whether or not that directly or directly contains it on this particular system.Reported-by: lemmi <lemmi(a)nerd2nerd.org> Link: https://github.com/void-linux/void-packages/actions/runs/6999782606/job/190… Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>Reviewed-by: David Gibson <david(a)gibson.dropbear.id.au>--- port_fwd.c | 2 ++ util.h | 1 + 2 files changed, 3 insertions(+) diff --git a/port_fwd.c b/port_fwd.c index 7943a30..6f6c836 100644 --- a/port_fwd.c +++ b/port_fwd.c @@ -17,6 +17,8 @@ #include <errno.h> #include <fcntl.h> #include <sched.h> +#include <unistd.h> +#include <stdio.h> #include "util.h" #include "port_fwd.h" diff --git a/util.h b/util.h index 1f02588..86f1a7e 100644 --- a/util.h +++ b/util.h @@ -10,6 +10,7 @@ #include <stdarg.h> #include <stdbool.h> #include <string.h> +#include <signal.h> #include "log.h"-- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson