aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/generic
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/lockf64.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/generic/lockf64.c b/sysdeps/generic/lockf64.c
index 3d27964..0caae6a 100644
--- a/sysdeps/generic/lockf64.c
+++ b/sysdeps/generic/lockf64.c
@@ -49,6 +49,7 @@ lockf64 (int fd, int cmd, off64_t len64)
case F_TEST:
/* Test the lock: return 0 if FD is unlocked or locked by this process;
return -1, set errno to EACCES, if another process holds the lock. */
+ fl.l_type = F_RDLCK;
if (__fcntl (fd, F_GETLK, &fl) < 0)
return -1;
if (fl.l_type == F_UNLCK || fl.l_pid == __getpid ())