summaryrefslogtreecommitdiffstats
path: root/mount/pivot_root.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:26:14 +0100
committerKarel Zak2006-12-07 00:26:14 +0100
commitd03dd60840f0a08464d5266539ad356aefe24b03 (patch)
tree0a9ad240a7a88eb6b11b152974a7a51a0df79b75 /mount/pivot_root.c
parentImported from util-linux-2.12pre tarball. (diff)
downloadkernel-qcow2-util-linux-d03dd60840f0a08464d5266539ad356aefe24b03.tar.gz
kernel-qcow2-util-linux-d03dd60840f0a08464d5266539ad356aefe24b03.tar.xz
kernel-qcow2-util-linux-d03dd60840f0a08464d5266539ad356aefe24b03.zip
Imported from util-linux-2.12a tarball.
Diffstat (limited to 'mount/pivot_root.c')
-rw-r--r--mount/pivot_root.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mount/pivot_root.c b/mount/pivot_root.c
index a844b480e..ba2dbbed0 100644
--- a/mount/pivot_root.c
+++ b/mount/pivot_root.c
@@ -3,14 +3,17 @@
/* Written 2000 by Werner Almesberger */
#include <stdio.h>
-#include <errno.h> /* needed for <linux/unistd.h> below */
+#include <sys/syscall.h>
+#include <unistd.h>
-#ifdef __ia64__
-# include <sys/syscall.h>
-# define pivot_root(new_root,put_old) syscall(SYS_pivot_root,new_root,put_old)
-#else
-# include <linux/unistd.h>
+#define pivot_root(new_root,put_old) syscall(SYS_pivot_root,new_root,put_old)
+#if 0
+/*
+ * With kernelheaders 2.3.41 or later, and ancient libc, try the following.
+ */
+#include <errno.h>
+#include <linux/unistd.h>
static
_syscall2(int,pivot_root,const char *,new_root,const char *,put_old)
#endif