Hi, fwiw I can confirm that the package builds fine in Debian with the patch. Although to get it to build in Ubuntu, I had to define _GNU_SOURCE in some more source files that use the CLONE_* defines from <sched.h>.
My patch is attached. Cheers, Andreas
Description: Define GNU_SOURCE for more source files to fix sched.h macros Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/ltp/+bug/935286 diff -u ltp-20091231+dfsg/testcases/kernel/containers/netns/par_chld_ipv6.c ltp-20091231+dfsg/testcases/kernel/containers/netns/par_chld_ipv6.c --- ltp-20091231+dfsg/testcases/kernel/containers/netns/par_chld_ipv6.c +++ ltp-20091231+dfsg/testcases/kernel/containers/netns/par_chld_ipv6.c @@ -25,6 +25,10 @@ * 31/07/2008 =========================================================================*/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include <sys/utsname.h> #include <sched.h> #include <stdio.h> diff -u ltp-20091231+dfsg/testcases/kernel/containers/netns/two_children_ns.c ltp-20091231+dfsg/testcases/kernel/containers/netns/two_children_ns.c --- ltp-20091231+dfsg/testcases/kernel/containers/netns/two_children_ns.c +++ ltp-20091231+dfsg/testcases/kernel/containers/netns/two_children_ns.c @@ -28,6 +28,10 @@ * 31/07/2008 *******************************************************************************/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include <stdio.h> #include <stdlib.h> #include <sched.h> diff -u ltp-20091231+dfsg/testcases/kernel/containers/netns/common.c ltp-20091231+dfsg/testcases/kernel/containers/netns/common.c --- ltp-20091231+dfsg/testcases/kernel/containers/netns/common.c +++ ltp-20091231+dfsg/testcases/kernel/containers/netns/common.c @@ -24,6 +24,10 @@ * Author: Veerendra <vee...@linux.vnet.ibm.com> =========================================================================*/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include <sys/utsname.h> #include <sched.h> #include <stdio.h> diff -u ltp-20091231+dfsg/testcases/kernel/syscalls/clone/clone02.c ltp-20091231+dfsg/testcases/kernel/syscalls/clone/clone02.c --- ltp-20091231+dfsg/testcases/kernel/syscalls/clone/clone02.c +++ ltp-20091231+dfsg/testcases/kernel/syscalls/clone/clone02.c @@ -90,6 +90,10 @@ * * ****************************************************************/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #if defined UCLINUX && !__THROW /* workaround for libc bug */ --- ltp-20091231+dfsg.orig/testcases/kernel/security/tomoyo/newns.c +++ ltp-20091231+dfsg/testcases/kernel/security/tomoyo/newns.c @@ -17,6 +17,10 @@ /* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* */ /******************************************************************************/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include <stdio.h> #include <sys/types.h> #include <sys/wait.h> only in patch2: unchanged: --- ltp-20091231+dfsg.orig/testcases/kernel/controllers/cgroup/test_6_2.c +++ ltp-20091231+dfsg/testcases/kernel/controllers/cgroup/test_6_2.c @@ -19,6 +19,9 @@ /* Author: Li Zefan <l...@cn.fujitsu.com> */ /* */ /******************************************************************************/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include <stdlib.h> #include <unistd.h> only in patch2: unchanged: --- ltp-20091231+dfsg.orig/testcases/kernel/fs/fs_bind/bin/nsclone.c +++ ltp-20091231+dfsg/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 */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include <stdlib.h> #include <stdio.h> #include <string.h> only in patch2: unchanged: --- ltp-20091231+dfsg.orig/testcases/kernel/containers/pidns/pidns03.c +++ ltp-20091231+dfsg/testcases/kernel/containers/pidns/pidns03.c @@ -46,6 +46,10 @@ * 27/12/07 RISHIKESH K RAJAK <risra...@in.ibm.com> Created this test * *******************************************************************************************/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + #include <sys/wait.h> #include <sys/mount.h> #include <assert.h> only in patch2: unchanged: --- ltp-20091231+dfsg.orig/testcases/kernel/syscalls/clone/clone05.c +++ ltp-20091231+dfsg/testcases/kernel/syscalls/clone/clone05.c @@ -64,6 +64,9 @@ * -P x : Pause for x seconds between iterations. * -t : Turn on syscall timing. ****************************************************************/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #if defined UCLINUX && !__THROW /* workaround for libc bug */ only in patch2: unchanged: --- ltp-20091231+dfsg.orig/testcases/kernel/syscalls/unshare/unshare01.c +++ ltp-20091231+dfsg/testcases/kernel/syscalls/unshare/unshare01.c @@ -73,6 +73,9 @@ /* History: Porting from Crackerjack to LTP is done by */ /* Manas Kumar Nayak makna...@in.ibm.com> */ /********************************************************************************/ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif #include <stdio.h> #include <sys/wait.h>
signature.asc
Description: OpenPGP digital signature