diff options
author | Z. Liu <zhixu.liu@gmail.com> | 2024-08-24 23:25:03 +0800 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2024-09-25 22:18:57 +0000 |
commit | 26de8c20c7ad0a30c2263b65424f72b45ad852e7 (patch) | |
tree | 3299246dd5690f3b407b1d4e879dcc2d1d741ff9 /src | |
parent | 0ff21cdee12a474fce0ff893aa999d954f5dc3d4 (diff) | |
download | runit-26de8c20c7ad0a30c2263b65424f72b45ad852e7.tar.gz runit-26de8c20c7ad0a30c2263b65424f72b45ad852e7.tar.xz runit-26de8c20c7ad0a30c2263b65424f72b45ad852e7.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/chpst.c | 1 | ||||
-rw-r--r-- | src/pathexec_run.c | 1 | ||||
-rw-r--r-- | src/prot.c | 2 | ||||
-rw-r--r-- | src/seek_set.c | 1 |
4 files changed, 5 insertions, 0 deletions
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 <sys/time.h> #include <sys/resource.h> #include <unistd.h> +#include <grp.h> #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 <unistd.h> #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 <unistd.h> +#include <grp.h> #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 <sys/types.h> +#include <unistd.h> #include "seek.h" #define SET 0 /* sigh */ |