diff --git a/plat/linux/libsys/syscalls.h b/plat/linux/libsys/syscalls.h index 19d5543c6..8bddcc0ee 100644 --- a/plat/linux/libsys/syscalls.h +++ b/plat/linux/libsys/syscalls.h @@ -174,6 +174,12 @@ #define __NR_mremap 163 #define __NR_setresuid 164 #define __NR_getresuid 165 + +/* + * i386, m68020, powerpc use different numbers after 165. + * This file only has the numbers for i386. + */ +#if defined(__i386) #define __NR_vm86 166 #define __NR_query_module 167 #define __NR_poll 168 @@ -324,5 +330,6 @@ #define concat(x, y) x##y #define MAPPED_SYSCALL(p, n) .define concat(p,n); concat(p,n): xor eax, eax; movb al, concat(__NR_,n); jmp __mapped_syscall +#endif /* __i386 */ #endif diff --git a/plat/linux386/libsys/build.lua b/plat/linux386/libsys/build.lua index a4d2d7447..7de7b4061 100644 --- a/plat/linux386/libsys/build.lua +++ b/plat/linux386/libsys/build.lua @@ -6,6 +6,7 @@ acklibrary { "plat/linux/libsys/*.s", }, deps = { + "plat/linux/libsys/*.h", "lang/cem/libcc.ansi/headers+headers", "plat/linux386/include+headers", }, diff --git a/plat/linux/libsys/errno.s b/plat/linux386/libsys/trapno.s similarity index 100% rename from plat/linux/libsys/errno.s rename to plat/linux386/libsys/trapno.s diff --git a/plat/linux68k/libsys/build.lua b/plat/linux68k/libsys/build.lua index ded71cdd1..c17436517 100644 --- a/plat/linux68k/libsys/build.lua +++ b/plat/linux68k/libsys/build.lua @@ -6,6 +6,7 @@ acklibrary { "plat/linux/libsys/*.s", }, deps = { + "plat/linux/libsys/*.h", "lang/cem/libcc.ansi/headers+headers", "plat/linux68k/include+headers", }, diff --git a/plat/linuxppc/libsys/build.lua b/plat/linuxppc/libsys/build.lua index 696c62d42..f58df16ea 100644 --- a/plat/linuxppc/libsys/build.lua +++ b/plat/linuxppc/libsys/build.lua @@ -8,7 +8,6 @@ acklibrary { "plat/linux/libsys/_hol0.s", "plat/linux/libsys/close.c", "plat/linux/libsys/creat.c", - "plat/linux/libsys/errno.s", "plat/linux/libsys/execve.c", "plat/linux/libsys/getpid.c", "plat/linux/libsys/gettimeofday.c", @@ -25,6 +24,7 @@ acklibrary { "plat/linux/libsys/write.c", }, deps = { + "plat/linux/libsys/*.h", "lang/cem/libcc.ansi/headers+headers", "plat/linuxppc/include+headers", }, diff --git a/plat/osx386/libsys/build.lua b/plat/osx386/libsys/build.lua index 23e491f7a..6a5b0e58c 100644 --- a/plat/osx386/libsys/build.lua +++ b/plat/osx386/libsys/build.lua @@ -19,7 +19,7 @@ acklibrary { "./sigaction.s", "./stat.s", "./write.s", - "plat/linux/libsys/errno.s", + "plat/linux386/libsys/trapno.s", "plat/osx/libsys/brk.c", "plat/osx/libsys/creat.c", "plat/osx/libsys/isatty.c",