From 2bf668dceed3fbea9f596afc4f90d829497401b3 Mon Sep 17 00:00:00 2001 From: Petr Gotthard Date: Wed, 5 Feb 2020 15:35:44 +0000 Subject: [PATCH] compat: Fix a typo in pidfile when O_CLOEXEC is not defined While here, include fcntl.h in if.c for older environments. --- compat/pidfile.c | 2 +- src/if.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 81e07827..2172ec4e 100644 --- a/src/if.c +++ b/src/if.c @@ -54,6 +54,7 @@ #include #include #include +#include #include #include #include -- 2.47.3