From a6b005f256383812d52f0a420c3034e59646cd92 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 4 Apr 2001 17:17:04 +0000 Subject: [PATCH] Fix a pasto in flock-style unlocking and include for flock on older systems; twetzel@gwdg.de --- fileops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fileops.c b/fileops.c index 3801cc235..78b05c679 100644 --- a/fileops.c +++ b/fileops.c @@ -42,6 +42,9 @@ #include #include #include +#ifdef HAVE_FLOCK +#include +#endif /* HAVE_FLOCK */ #ifdef HAVE_UTIME # ifdef HAVE_UTIME_H # include @@ -119,7 +122,7 @@ lock_file(fd, lockit) op = LOCK_EX | LOCK_NB; break; case SUDO_UNLOCK: - op = LOCK_EX; + op = LOCK_UN; break; } return(flock(fd, op) == 0); -- 2.40.0