Package: linux-kernel-headers Version: 2.6.18-1 Severity: normal Tags: patch
File /usr/include/linux/unistd.h misses syscall macros, preventing building of UML: [EMAIL PROTECTED]:~/kernel/kernel-uml$ LANG=C make ARCH=um make[1]: `arch/um/sys-i386/user-offsets.s' is up to date. CHK include/linux/version.h CHK include/linux/utsrelease.h CHK include/linux/compile.h CC arch/um/os-Linux/process.o arch/um/os-Linux/process.c:144: error: expected declaration specifiers or '...' before 'getpid' arch/um/os-Linux/process.c:146: warning: return type defaults to 'int' arch/um/os-Linux/process.c: In function '_syscall0': arch/um/os-Linux/process.c:147: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:152: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:158: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:173: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:183: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:197: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:207: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:242: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:254: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' $arch/um/os-Linux/process.c:274: error: expected '=', ',', ';', 'asm' or '__attribute__' be fore '{' $arch/um/os-Linux/process.c:144: error: parameter name omitted arch/um/os-Linux/process.c:284: error: expected '{' at end of input make[1]: *** [arch/um/os-Linux/process.o] Error 1 make: *** [arch/um/os-Linux] Error 2 The attached patch found on http://www.uwsg.iu.edu/hypermail/linux/kernel/0609.2/1018.html fixes the issue. Cheers, Julien -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (500, 'unstable'), (10, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-ck1-hathor Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) -- no debconf information
--- unistd.h 2006-10-05 14:59:01.000000000 +0200 +++ unistd.h.new 2006-10-05 14:58:49.000000000 +0200 @@ -11,5 +11,63 @@ * Include machine specific syscallX macros */ #include <asm/unistd.h> +#include <sys/syscall.h> +#include <unistd.h> + + +#undef _syscall0 +#undef _syscall1 +#undef _syscall2 +#undef _syscall3 +#undef _syscall4 +#undef _syscall5 +#undef _syscall6 + + +#define _syscall0(type,name) \ +type name(void) \ +{\ + return syscall(__NR_##name);\ +} + +#define _syscall1(type,name,type1,arg1) \ +type name(type1 arg1) \ +{\ + return syscall(__NR_##name, arg1);\ +} + +#define _syscall2(type,name,type1,arg1,type2,arg2) \ +type name(type1 arg1,type2 arg2) \ +{\ + return syscall(__NR_##name, arg1, arg2);\ +} + +#define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ +type name(type1 arg1,type2 arg2,type3 arg3) \ +{\ + return syscall(__NR_##name, arg1, arg2, arg3);\ +} + +#define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ +type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4) \ +{\ + return syscall(__NR_##name, arg1, arg2, arg3, arg4);\ +} + +#define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ + type5,arg5) \ +type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ +{\ + return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5);\ +} + + +#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ + type5,arg5,type6,arg6) \ +type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ +{\ + return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5, arg6);\ +} + #endif /* _LINUX_UNISTD_H_ */