Patchwork [1/3] linux-user: Fix compilation for "old" linux versions

login
register
mail settings
Submitter Riku Voipio
Date May 2, 2011, 9:19 a.m.
Message ID <1304327950-21422-2-git-send-email-riku.voipio@iki.fi>
Download mbox | patch
Permalink /patch/93615/
State New
Headers show

Comments

Riku Voipio - May 2, 2011, 9:19 a.m.
From: Stefan Weil <weil@mail.berlios.de>

Debian Lenny and other installations with older linux versions
failed to compile linux-user because some CLONE_xxx macros are
undefined.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
 linux-user/strace.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

Patch

diff --git a/linux-user/strace.c b/linux-user/strace.c
index 5d9bb08..fe9326a 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -477,12 +477,24 @@  UNUSED static struct flags clone_flags[] = {
     FLAG_GENERIC(CLONE_DETACHED),
     FLAG_GENERIC(CLONE_UNTRACED),
     FLAG_GENERIC(CLONE_CHILD_SETTID),
+#if defined(CLONE_NEWUTS)
     FLAG_GENERIC(CLONE_NEWUTS),
+#endif
+#if defined(CLONE_NEWIPC)
     FLAG_GENERIC(CLONE_NEWIPC),
+#endif
+#if defined(CLONE_NEWUSER)
     FLAG_GENERIC(CLONE_NEWUSER),
+#endif
+#if defined(CLONE_NEWPID)
     FLAG_GENERIC(CLONE_NEWPID),
+#endif
+#if defined(CLONE_NEWNET)
     FLAG_GENERIC(CLONE_NEWNET),
+#endif
+#if defined(CLONE_IO)
     FLAG_GENERIC(CLONE_IO),
+#endif
     FLAG_END,
 };