From: Cyril H. <su...@li...> - 2011-08-26 11:11:00
|
The branch, master, has been updated via 019ed6c71369217ac02c399abb12abb93bd527f3 (commit) from e37003ddcc5c524d7474469aa4656e534b7eccae (commit) - Log ----------------------------------------------------------------- commit 019ed6c71369217ac02c399abb12abb93bd527f3 Author: Cyril Hrubis <ch...@su...> Date: Fri Aug 26 12:59:32 2011 +0200 Fix build with latest glibc. Since glibc commit ce67228d570d2df88d74184e5e3618a5b2ef8704 (glibc-2.14 probably) the cloning flags require _GNU_SOURCE defined. Signed-off-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/containers/netns/common.c | 2 ++ testcases/kernel/containers/netns/par_chld_ipv6.c | 4 +++- .../kernel/containers/netns/two_children_ns.c | 4 +++- testcases/kernel/controllers/cgroup/test_6_2.c | 4 +++- testcases/kernel/fs/fs_bind/bin/nsclone.c | 5 ++++- testcases/kernel/security/tomoyo/newns.c | 5 ++++- testcases/kernel/syscalls/clone/clone02.c | 7 ++++--- testcases/kernel/syscalls/clone/clone05.c | 4 +++- testcases/kernel/syscalls/unshare/unshare01.c | 2 ++ 9 files changed, 28 insertions(+), 9 deletions(-) diff --git a/testcases/kernel/containers/netns/common.c b/testcases/kernel/containers/netns/common.c index 9afb508..4a80fb8 100644 --- a/testcases/kernel/containers/netns/common.c +++ b/testcases/kernel/containers/netns/common.c @@ -24,6 +24,8 @@ * Author: Veerendra <ve...@li...> =========================================================================*/ +#define _GNU_SOURCE + #include <sys/utsname.h> #include <sched.h> #include <stdio.h> diff --git a/testcases/kernel/containers/netns/par_chld_ipv6.c b/testcases/kernel/containers/netns/par_chld_ipv6.c index 6186c4c..852aed8 100644 --- a/testcases/kernel/containers/netns/par_chld_ipv6.c +++ b/testcases/kernel/containers/netns/par_chld_ipv6.c @@ -25,6 +25,8 @@ * 31/07/2008 =========================================================================*/ +#define _GNU_SOURCE + #include <sys/utsname.h> #include <sched.h> #include <stdio.h> @@ -114,4 +116,4 @@ parent & child NS\n"); } return status; } -} \ No newline at end of file +} diff --git a/testcases/kernel/containers/netns/two_children_ns.c b/testcases/kernel/containers/netns/two_children_ns.c index da80d41..9d1e46d 100644 --- a/testcases/kernel/containers/netns/two_children_ns.c +++ b/testcases/kernel/containers/netns/two_children_ns.c @@ -28,6 +28,8 @@ * 31/07/2008 *******************************************************************************/ +#define _GNU_SOURCE + #include <stdio.h> #include <stdlib.h> #include <sched.h> @@ -131,4 +133,4 @@ int main() } } exit(0); -} \ No newline at end of file +} diff --git a/testcases/kernel/controllers/cgroup/test_6_2.c b/testcases/kernel/controllers/cgroup/test_6_2.c index 492c4bd..cde2e53 100644 --- a/testcases/kernel/controllers/cgroup/test_6_2.c +++ b/testcases/kernel/controllers/cgroup/test_6_2.c @@ -20,6 +20,8 @@ /* */ /******************************************************************************/ +#define _GNU_SOURCE + #include <sched.h> #include <stdlib.h> #include <unistd.h> @@ -47,4 +49,4 @@ int main(int argc, char **argv) } tst_exit(); -} \ No newline at end of file +} diff --git a/testcases/kernel/fs/fs_bind/bin/nsclone.c b/testcases/kernel/fs/fs_bind/bin/nsclone.c index 9a78ab4..c0f417f 100644 --- a/testcases/kernel/fs/fs_bind/bin/nsclone.c +++ b/testcases/kernel/fs/fs_bind/bin/nsclone.c @@ -16,6 +16,9 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#define _GNU_SOURCE + #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -63,4 +66,4 @@ int main(int argc, char *argv[]) exit(1); } exit(0); -} \ No newline at end of file +} diff --git a/testcases/kernel/security/tomoyo/newns.c b/testcases/kernel/security/tomoyo/newns.c index b520ff1..5a74d64 100644 --- a/testcases/kernel/security/tomoyo/newns.c +++ b/testcases/kernel/security/tomoyo/newns.c @@ -17,6 +17,9 @@ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* */ /******************************************************************************/ + +#define _GNU_SOURCE + #include <stdio.h> #include <sys/types.h> #include <sys/wait.h> @@ -43,4 +46,4 @@ int main(int argc, char *argv[]) while (waitpid(pid, NULL, __WALL) == EOF && errno == EINTR) c++; /* Dummy. */ return 0; -} \ No newline at end of file +} diff --git a/testcases/kernel/syscalls/clone/clone02.c b/testcases/kernel/syscalls/clone/clone02.c index 298d20a..5d4299b 100644 --- a/testcases/kernel/syscalls/clone/clone02.c +++ b/testcases/kernel/syscalls/clone/clone02.c @@ -96,13 +96,14 @@ #define __THROW #endif +#define _GNU_SOURCE + #include <errno.h> -#include <sched.h> #include <fcntl.h> #include <sys/wait.h> #include <sys/types.h> #include <sys/syscall.h> -#include <linux/unistd.h> +#include <sched.h> #include "test.h" #include "usctest.h" @@ -551,4 +552,4 @@ void sig_child_defined_handler(int pid) /* sig_default_handler() - Default handler for parent */ void sig_default_handler() { -} \ No newline at end of file +} diff --git a/testcases/kernel/syscalls/clone/clone05.c b/testcases/kernel/syscalls/clone/clone05.c index e5bf1fa..a661c78 100644 --- a/testcases/kernel/syscalls/clone/clone05.c +++ b/testcases/kernel/syscalls/clone/clone05.c @@ -70,6 +70,8 @@ #define __THROW #endif +#define _GNU_SOURCE + #include <errno.h> #include <sched.h> #include <sys/wait.h> @@ -171,4 +173,4 @@ int child_fn() sleep(1); parent_variable = 1; exit(1); -} \ No newline at end of file +} diff --git a/testcases/kernel/syscalls/unshare/unshare01.c b/testcases/kernel/syscalls/unshare/unshare01.c index 6c20099..f7314b4 100644 --- a/testcases/kernel/syscalls/unshare/unshare01.c +++ b/testcases/kernel/syscalls/unshare/unshare01.c @@ -74,6 +74,8 @@ /* Manas Kumar Nayak mak...@in...> */ /********************************************************************************/ +#define _GNU_SOURCE + #include <stdio.h> #include <sys/wait.h> #include <sys/types.h> hooks/post-receive -- ltp |