blob: 6300a5e9c30212e398c634ca51ff633f46db2ca7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: [PATCH] hurd: Fix F_*LK* fcntl with __USE_FILE_OFFSET64
2014-08-31 Samuel Thibault <samuel.thibault@ens-lyon.org>
struct flock64 uses 64bit values. This introduces other values for
F_GETLK, F_SETLK, F_SETLKW to distinguish between both.
* sysdeps/mach/hurd/bits/fcntl.h (F_GETLK64, F_SETLK64, F_SETLKW64): New
macros
[__USE_FILE_OFFSET64] (F_GETLK, F_SETLK, F_SETLKW): Define to F_GETLK64,
F_SETLK64, F_SETLKW64, respectively.
* sysdeps/mach/hurd/f_setlk.c: New file.
* sysdeps/mach/hurd/f_setlk.h: New file.
* sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Include "f_setlk.h",
make F_SETLK and F_SETLKW call __f_setlk instead of __flock.
Handle F_GETLK64, F_SETLK64, F_SETLKW64 cases.
* sysdeps/mach/hurd/Makefile (sysdeps_routines): Add f_setlk in
io dir.
WARNING: this includes the ATOMIC change, do not submit that part.
|