[PATCH 03/18] user-cr: Fix missing CLONE_NEWIPC

Matt Helsley matthltc at us.ibm.com
Thu Mar 17 10:27:35 PDT 2011


Some not-so-old distros still lack the CLONE_NEWIPC definition:

cc -g -Wall -Wstrict-prototypes -Wno-trigraphs    ipcshm_multi.c  -lm -o ipcshm_multi
ipcshm_multi.c: In function ‘child3’:
ipcshm_multi.c:160: error: ‘CLONE_NEWIPC’ undeclared (first use in this function)
ipcshm_multi.c:160: error: (Each undeclared identifier is reported only once
ipcshm_multi.c:160: error: for each function it appears in.)
make[1]: *** [ipcshm_multi] Error 1
make[1]: Leaving directory `/tmp/user-cr/test'
make: *** [all] Error 2

Include the definition from "../clone.h"

Signed-off-by: Matt Helsley <matthltc at us.ibm.com>
---
 test/ipcshm_multi.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/test/ipcshm_multi.c b/test/ipcshm_multi.c
index fece96a..ff3712f 100644
--- a/test/ipcshm_multi.c
+++ b/test/ipcshm_multi.c
@@ -10,6 +10,9 @@
 #include <linux/sched.h>
 #include <sched.h>
 
+/* For CLONE_NEWIPC */
+#include "../clone.h"
+
 #define OUTFILE  "/tmp/cr-test.out"
 #define SEG_SIZE (20 * 4096)
 #define DELAY 20
-- 
1.6.3.3



More information about the Containers mailing list