From 17b9d3a055ca896ab78346ecdf460591596db52a Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 8 Feb 2015 21:02:14 +0100 Subject: Fix build --- .topmsg | 2 ++ sysdeps/mach/hurd/Makefile | 4 ++++ sysdeps/mach/hurd/f_setlk.h | 1 + sysdeps/mach/hurd/fcntl.c | 6 +++--- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.topmsg b/.topmsg index b96360e5cd..6300a5e9c3 100644 --- a/.topmsg +++ b/.topmsg @@ -14,5 +14,7 @@ Subject: [PATCH] hurd: Fix F_*LK* fcntl with __USE_FILE_OFFSET64 * 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. diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile index fe028316ae..405da67db6 100644 --- a/sysdeps/mach/hurd/Makefile +++ b/sysdeps/mach/hurd/Makefile @@ -191,6 +191,10 @@ ifeq (hurd, $(subdir)) sysdep_routines += cthreads endif +ifeq (io, $(subdir)) +sysdep_routines += f_setlk +endif + ifeq ($(subdir),sunrpc) sysdep_headers += nfs/nfs.h endif diff --git a/sysdeps/mach/hurd/f_setlk.h b/sysdeps/mach/hurd/f_setlk.h index a9d09fd90a..16c7a8ca8d 100644 --- a/sysdeps/mach/hurd/f_setlk.h +++ b/sysdeps/mach/hurd/f_setlk.h @@ -19,4 +19,5 @@ #define _F_SETLK_H 1 extern int __f_setlk (int fd, int type, int whence, __off64_t start, __off64_t len, int wait); + #endif /* f_setlk.h */ diff --git a/sysdeps/mach/hurd/fcntl.c b/sysdeps/mach/hurd/fcntl.c index a7ef21be1c..bda478b702 100644 --- a/sysdeps/mach/hurd/fcntl.c +++ b/sysdeps/mach/hurd/fcntl.c @@ -142,7 +142,7 @@ __libc_fcntl (int fd, int cmd, ...) /* FALLTHROUGH */ case F_SETLK: return __f_setlk (fd, fl->l_type, fl->l_whence, - fl->l_start, fl->l_end, wait); + fl->l_start, fl->l_len, wait); default: errno = EINVAL; return -1; @@ -153,7 +153,7 @@ __libc_fcntl (int fd, int cmd, ...) case F_SETLK64: case F_SETLKW64: { - struct flock64 *fl64 = va_arg (ap, struct flock64 *); + struct flock64 *fl = va_arg (ap, struct flock64 *); int wait = 0; va_end (ap); switch (cmd) @@ -166,7 +166,7 @@ __libc_fcntl (int fd, int cmd, ...) /* FALLTHROUGH */ case F_SETLKW64: return __f_setlk (fd, fl->l_type, fl->l_whence, - fl->l_start, fl->l_end, wait); + fl->l_start, fl->l_len, wait); default: errno = EINVAL; return -1; -- cgit v1.2.3