summaryrefslogtreecommitdiff
path: root/linux-user/syscall_defs.h
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@iki.fi>2009-06-18 22:51:31 +0300
committermalc <av1474@comtv.ru>2009-06-19 02:51:47 +0400
commit03dfe9f871871921c03c3c65ff69c68759186994 (patch)
treee60fdcdfda452fde99c00f3a1d49a1ceb45f6087 /linux-user/syscall_defs.h
parent5d928867920e27d61d581710aac3a167c9e86e4f (diff)
downloadqemu-03dfe9f871871921c03c3c65ff69c68759186994.tar.gz
linux-user: strace now handles guest stringscorrectly [v2]
On Tue, Jun 16, 2009 at 08:19:23PM -0500, Anthony Liguori wrote: > malc wrote: >> >> On my system the above line causes gcc to emit: >> >> In file included from /home/malc/x/rcs/git/qemu/linux-user/strace.c:12: >> /usr/include/linux/futex.h:48: error: field `__user' has incomplete type >> /usr/include/linux/futex.h:48: error: syntax error before '*' token >> /usr/include/linux/futex.h:63: error: field `list' has incomplete type >> /usr/include/linux/futex.h:83: error: field `__user' has incomplete type >> /usr/include/linux/futex.h:83: error: syntax error before '*' token >> make[1]: *** [strace.o] Error 1 > We had the same problem with usb-linux.c. It's broken system headers, > the __user stuff is supposed to get removed as part of the headers > installation. > It builds fine on my system (Fedora 10). Howabout something like this: commit eb8387cb0eda32a18880664eb5f0ca5c8bf05b45 Author: Riku Voipio <riku.voipio@iki.fi> Date: Thu Jun 18 22:44:31 2009 +0300 Subject: linux-user: include futex defines directly Since some common distributions have broken linux/futex.h, stop including it. Instead add the defines directly. Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user/syscall_defs.h')
-rw-r--r--linux-user/syscall_defs.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 24217e40c9..acb781f4b6 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2120,3 +2120,20 @@ struct target_mq_attr {
#include "socket.h"
#include "errno_defs.h"
+
+#define FUTEX_WAIT 0
+#define FUTEX_WAKE 1
+#define FUTEX_FD 2
+#define FUTEX_REQUEUE 3
+#define FUTEX_CMP_REQUEUE 4
+#define FUTEX_WAKE_OP 5
+#define FUTEX_LOCK_PI 6
+#define FUTEX_UNLOCK_PI 7
+#define FUTEX_TRYLOCK_PI 8
+#define FUTEX_WAIT_BITSET 9
+#define FUTEX_WAKE_BITSET 10
+
+#define FUTEX_PRIVATE_FLAG 128
+#define FUTEX_CLOCK_REALTIME 256
+#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
+