diff options
author | Z. Liu <zhixu.liu@gmail.com> | 2024-08-24 23:01:29 +0800 |
---|---|---|
committer | Gerrit Pape <pape@smarden.org> | 2024-09-25 22:14:00 +0000 |
commit | 8aaa59ec8d096d892b315c8fe691c4eca306ba01 (patch) | |
tree | 99d43257189c7bf78579141e277b9ff37c4b2623 /src/tryflock.c | |
parent | 1fea9d47117eebcd1cb3e1bf259fa1cc5d4895ec (diff) | |
download | runit-8aaa59ec8d096d892b315c8fe691c4eca306ba01.tar.gz runit-8aaa59ec8d096d892b315c8fe691c4eca306ba01.tar.xz runit-8aaa59ec8d096d892b315c8fe691c4eca306ba01.zip |
fix undesired compilation error(s) of feature test
If don't fix, the feature test will generate undesired .h which will be used in later compilation, some will cause build failed. see *.h{1,2} for details, run following cmd to see difference: diff -uprN <(more *.h1|sed 's:\.h1$:.h:g') <(more *.h2|sed 's:\.h2$:.h:g') found by using clang 18 with CFLAGS: -Wall link of debian's patches is: https://salsa.debian.org/debian/runit/-/tree/master/debian/patches 0029-fix-ftbfs-with-gcc14.patch chkshsgr.c trycpp.c trypoll.c tryshsgr.c tryulong64.c: error: call to undeclared function '...'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] functions are: _exit, exit, getgroups, printf, setgroups tryflock.c trysgact.c trysgprm.c trywaitp.c: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
Diffstat (limited to 'src/tryflock.c')
-rw-r--r-- | src/tryflock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tryflock.c b/src/tryflock.c index a82ffc2..68599d3 100644 --- a/src/tryflock.c +++ b/src/tryflock.c @@ -4,7 +4,7 @@ #include <sys/file.h> #include <fcntl.h> -main() +int main() { flock(0,LOCK_EX | LOCK_UN | LOCK_NB); } |