summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorPetr Gotthard <petr.gotthard@advantech-bb.cz>2020-02-05 15:35:44 +0000
committerRoy Marples <roy@marples.name>2020-02-05 15:37:27 +0000
commit2bf668dceed3fbea9f596afc4f90d829497401b3 (patch)
tree0e87b20aab3ca207fe5ee148c2f8a7516ee056aa /compat
parentb6b8910d23cd15bb0d7bf3b3b31ada3899db2f6f (diff)
downloaddhcpcd-2bf668dceed3fbea9f596afc4f90d829497401b3.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.
Diffstat (limited to 'compat')
-rw-r--r--compat/pidfile.c2
1 files changed, 1 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;