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-10 21:22:36 +0000 |
| commit | 9c1091218d1acb6c38b5e012f03ec1ecac682e36 (patch) | |
| tree | 1a8efea399ff8b89df163304240b9130b2dc8717 | |
| parent | ead07a8079eb4863111d1ce8ace76bf0fa53016e (diff) | |
| download | dhcpcd-9c1091218d1acb6c38b5e012f03ec1ecac682e36.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; @@ -53,6 +53,7 @@ #include <errno.h> #include <ifaddrs.h> #include <inttypes.h> +#include <fcntl.h> #include <fnmatch.h> #include <stddef.h> #include <stdio.h> |
