From: Petr Gotthard Date: Wed, 5 Feb 2020 15:35:44 +0000 (+0000) Subject: compat: Fix a typo in pidfile when O_CLOEXEC is not defined X-Git-Tag: v8.1.7~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c9a59bca4b99e4523c179a75b0b9d67173c518e;p=thirdparty%2Fdhcpcd.git compat: Fix a typo in pidfile when O_CLOEXEC is not defined While here, include fcntl.h in if.c for older environments. --- diff --git a/compat/pidfile.c b/compat/pidfile.c index 6aea468b..bd7887ac 100644 --- a/compat/pidfile.c +++ b/compat/pidfile.c @@ -208,7 +208,7 @@ pidfile_lock(const char *path) goto return_pid; #ifndef O_CLOEXEC if ((opts = fcntl(fd, F_GETFD)) == -1 || - fctnl(fd, F_SETFL, opts | FD_CLOEXEC) == -1) + fcntl(fd, F_SETFL, opts | FD_CLOEXEC) == -1) { int error = errno; diff --git a/src/if.c b/src/if.c index 044dba45..c58c9380 100644 --- a/src/if.c +++ b/src/if.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include