From ae5d44275aa5ffaa4664b169c07e97a85309bbcb Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Fri, 28 Nov 2003 23:12:16 +0000 Subject: [PATCH] s!sys_virtual_context!sys_vserver! made it compilable with '-fPIC' git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/branches/SYSCALL_SWITCH@452 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/lib/vserver-internal.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/util-vserver/lib/vserver-internal.h b/util-vserver/lib/vserver-internal.h index 01e2170..32cb55a 100644 --- a/util-vserver/lib/vserver-internal.h +++ b/util-vserver/lib/vserver-internal.h @@ -26,8 +26,8 @@ #include #include -#ifndef __NR_sys_virtual_context -# define __NR_sys_virtual_context 273 +#ifndef __NR_sys_vserver +# define __NR_sys_vserver 273 #endif #define VC_PREFIX 0) @@ -88,10 +88,18 @@ extern "C" { #endif #ifndef HAVE_SYS_VIRTUAL_CONTEXT -static UNUSED -_syscall3(int, sys_virtual_context, +#if defined(__pic__) && defined(__i386) +inline static UNUSED ALWAYSINLINE +int sys_vserver(uint32_t cmd, uint32_t id, void *data) +{ + return syscall(__NR_sys_vserver, cmd, id, data); +} +#else +inline static UNUSED ALWAYSINLINE +_syscall3(int, sys_vserver, uint32_t, cmd, uint32_t, id, void *, data) #endif +#endif size_t utilvserver_uint2str(char *buf, size_t len, unsigned int val, unsigned char base); -- 1.8.1.5