summaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/mach/hurd/bits/fcntl.h9
-rw-r--r--sysdeps/mach/hurd/fcntl.c9
2 files changed, 18 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h
index 9d598a1bf2..1c652c8405 100644
--- a/sysdeps/mach/hurd/bits/fcntl.h
+++ b/sysdeps/mach/hurd/bits/fcntl.h
@@ -163,9 +163,18 @@
# define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
# define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
#endif
+#ifdef __USE_FILE_OFFSET64
+#define F_GETLK F_GETLK64
+#define F_SETLK F_SETLK64
+#define F_SETLKW F_SETLKW64
+#else
#define F_GETLK 7 /* Get record locking info. */
#define F_SETLK 8 /* Set record locking info (non-blocking). */
#define F_SETLKW 9 /* Set record locking info (blocking). */
+#endif
+#define F_GETLK64 10 /* Get record locking info. */
+#define F_SETLK64 11 /* Set record locking info (non-blocking). */
+#define F_SETLKW64 12 /* Set record locking info (blocking). */
#ifdef __USE_XOPEN2K8
# define F_DUPFD_CLOEXEC 1030 /* Duplicate, set FD_CLOEXEC on new one. */
diff --git a/sysdeps/mach/hurd/fcntl.c b/sysdeps/mach/hurd/fcntl.c
index 70180fa9c6..ccc53dbb2d 100644
--- a/sysdeps/mach/hurd/fcntl.c
+++ b/sysdeps/mach/hurd/fcntl.c
@@ -128,6 +128,8 @@ __libc_fcntl (int fd, int cmd, ...)
case F_SETLK:
case F_SETLKW:
{
+ /* XXX: TODO: replace with conversion to flock64 and actual
+ implementation. */
/* XXX
We need new RPCs to support POSIX.1 fcntl file locking!!
For the time being we support the whole-file case only,
@@ -179,6 +181,13 @@ __libc_fcntl (int fd, int cmd, ...)
return __flock (fd, cmd);
}
+ case F_GETLK64:
+ case F_SETLK64:
+ case F_SETLKW64:
+ {
+ struct flock64 *fl = va_arg (ap, struct flock64 *);
+ /* TODO: implementation */
+ }
case F_GETFL: /* Get per-open flags. */
if (err = HURD_FD_PORT_USE (d, __io_get_openmodes (port, &result)))