diff options
| author | Petr Gotthard <petr.gotthard@advantech-bb.cz> | 2020-02-05 15:35:44 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-02-05 15:35:44 +0000 |
| commit | 1c9a59bca4b99e4523c179a75b0b9d67173c518e (patch) | |
| tree | 7a48906ef11db0b5565a8f6954d0f2b8c072fd0b | |
| parent | 60bde9c63e01f1932e0ce782946989f942739dfb (diff) | |
| download | dhcpcd-1c9a59bca4b99e4523c179a75b0b9d67173c518e.tar.xz | |
compat: Fix a typo in pidfile when O_CLOEXEC is not defined
While here, include fcntl.h in if.c for older environments.
| -rw-r--r-- | compat/pidfile.c | 2 | ||||
| -rw-r--r-- | src/if.c | 1 |
2 files changed, 2 insertions, 1 deletions
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; @@ -54,6 +54,7 @@ #include <errno.h> #include <ifaddrs.h> #include <inttypes.h> +#include <fcntl.h> #include <fnmatch.h> #include <stddef.h> #include <stdio.h> |
