s!sys_virtual_context!sys_vserver!
authorEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 28 Nov 2003 23:12:16 +0000 (23:12 +0000)
committerEnrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Fri, 28 Nov 2003 23:12:16 +0000 (23:12 +0000)
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

index 01e2170..32cb55a 100644 (file)
@@ -26,8 +26,8 @@
 #include <asm/unistd.h>
 #include <errno.h>
 
-#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);