VC_ENABLE_API_V13(): incremented needed API-version
[util-vserver.git] / util-vserver / src / rpm-fake.c
index fb96fdf..5e44a08 100644 (file)
 
 #include "pathconfig.h"
 #include "util.h"
+#include "sys_clone.h"
 
 #include <vserver.h>
 
+#include <sys/socket.h>
 #include <dlfcn.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -42,7 +44,6 @@
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <sys/socket.h>
 #include <sys/un.h>
 #include <fcntl.h>
 #include <pwd.h>
@@ -180,7 +181,7 @@ initPwSocket()
        connect(pw_sock, (struct sockaddr *)(&addr), sizeof addr)==-1 ||
        (flag=fcntl(pw_sock, F_GETFD))==-1 ||
        fcntl(pw_sock, F_SETFD, flag | FD_CLOEXEC)==-1) {
-      perror("error while initializing pw-socket");
+      perror("rpm-fake.so: error while initializing pw-socket");
       exit(255);
     }
   }
@@ -523,10 +524,10 @@ removeNamespaceMounts(char const *path, char * const argv[])
       // make wait4() working...
     signal(SIGCHLD, SIG_DFL);
 
-#ifdef NDEBUG    
-    pid = syscall(__NR_clone, CLONE_NEWNS|SIGCHLD|CLONE_VFORK, 0);
+#ifdef NDEBUG
+    pid = sys_clone(CLONE_NEWNS|SIGCHLD|CLONE_VFORK, 0);
 #else
-    pid = syscall(__NR_clone, CLONE_NEWNS|SIGCHLD, 0);
+    pid = sys_clone(CLONE_NEWNS|SIGCHLD, 0);
 #endif
 
     switch (pid) {