From 26de8c20c7ad0a30c2263b65424f72b45ad852e7 Mon Sep 17 00:00:00 2001 From: "Z. Liu" Date: Sat, 24 Aug 2024 23:25:03 +0800 Subject: fix compilation error(s): call to undeclared function for C99 and later found by using clang 18 with CFLAGS: -Wall error: call to undeclared function '...'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] chpst.c: setgroups pathexec_run.c: execve prot.c: setgroups, setgid, setuid seek_set.c: lseek --- src/chpst.c | 1 + src/pathexec_run.c | 1 + src/prot.c | 2 ++ src/seek_set.c | 1 + 4 files changed, 5 insertions(+) diff --git a/src/chpst.c b/src/chpst.c index f279d44..2055aeb 100644 --- a/src/chpst.c +++ b/src/chpst.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "sgetopt.h" #include "error.h" #include "strerr.h" diff --git a/src/pathexec_run.c b/src/pathexec_run.c index 1770ac7..70ac7a8 100644 --- a/src/pathexec_run.c +++ b/src/pathexec_run.c @@ -1,5 +1,6 @@ /* Public domain. */ +#include #include "error.h" #include "stralloc.h" #include "str.h" diff --git a/src/prot.c b/src/prot.c index 79a88c5..a617a53 100644 --- a/src/prot.c +++ b/src/prot.c @@ -1,5 +1,7 @@ /* Public domain. */ +#include +#include #include "hasshsgr.h" #include "prot.h" diff --git a/src/seek_set.c b/src/seek_set.c index 19b8265..a1a36d0 100644 --- a/src/seek_set.c +++ b/src/seek_set.c @@ -1,6 +1,7 @@ /* Public domain. */ #include +#include #include "seek.h" #define SET 0 /* sigh */ -- cgit 1.4.1