file.c \
file_handle.c \
flock.c \
+ flock.h \
futex.c \
get_robust_list.c \
getcpu.c \
siginfo_t.si_timerid,
siginfo_t.si_overrun],,, [#include <signal.h>])
-AC_CHECK_TYPES([struct flock64],,, [#include <fcntl.h>])
+AC_CHECK_TYPES([struct flock,
+ struct flock64,
+ struct __kernel_flock,
+ struct __kernel_flock64],,, [#include <linux/fcntl.h>])
AC_CHECK_MEMBERS([struct timex.tai],,, [#include <sys/timex.h>])
*/
#include "defs.h"
-#include <fcntl.h>
+#include "flock.h"
#include "xlat/fcntlcmds.h"
#include "xlat/fdflags.h"
#if USE_PRINTFLOCK64
-# ifndef HAVE_STRUCT_FLOCK64
-struct flock64 {
- short int l_type, l_whence;
- int64_t l_start, l_len;
- int l_pid;
-};
-# endif
-
static void
printflock64(struct tcb *tcp, long addr, int getlk)
{
- struct flock64 fl;
+ struct_kernel_flock64 fl;
if (umove_or_printaddr(tcp, addr, &fl))
return;
static void
printflock(struct tcb *tcp, long addr, int getlk)
{
- struct flock fl;
+ struct_kernel_flock fl;
#if SUPPORTED_PERSONALITIES > 1
if (
--- /dev/null
+#include <linux/fcntl.h>
+
+#if defined HAVE_STRUCT_FLOCK
+typedef struct flock struct_kernel_flock;
+#elif defined HAVE_STRUCT___KERNEL_FLOCK
+typedef struct __kernel_flock struct_kernel_flock;
+#else
+# error struct flock definition not found in <linux/fcntl.h>
+#endif
+
+#if defined HAVE_STRUCT_FLOCK64
+typedef struct flock64 struct_kernel_flock64;
+#elif defined HAVE_STRUCT___KERNEL_FLOCK64
+typedef struct __kernel_flock64 struct_kernel_flock64;
+#else
+# error struct flock64 definition not found in <linux/fcntl.h>
+#endif