[CRIU] [PATCH] zdtm: workaround compiling errors on ubuntu 10.4

Andrew Vagin avagin at parallels.com
Wed Oct 24 06:06:53 EDT 2012


getsid is required _XOPEN_SOURCE_EXTENDED,
it's enabled if __GNU_SOURCE is defined.

session00.c:92: error: implicit declaration of function 'getsid'
---
 test/zdtm/live/static/session00.c |    1 +
 test/zdtm/live/static/session01.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/test/zdtm/live/static/session00.c b/test/zdtm/live/static/session00.c
index ef064b9..1712eee 100644
--- a/test/zdtm/live/static/session00.c
+++ b/test/zdtm/live/static/session00.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include <stdlib.h>
 #include <sys/wait.h>
diff --git a/test/zdtm/live/static/session01.c b/test/zdtm/live/static/session01.c
index f300630..2fe6aab 100644
--- a/test/zdtm/live/static/session01.c
+++ b/test/zdtm/live/static/session01.c
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
-- 
1.7.1



More information about the CRIU mailing list