summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/umount2.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-16 13:51:08 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:39 +0200
commit5046a84d82cd8125c981680d449f4d8c7ea5deb8 (patch)
tree1a1be59475114acc57bf2a121069d8154196d47e /libc/sysdeps/linux/common/umount2.c
parentc6dcc660d3133349f566c1170abd538aafd9ad76 (diff)
umount: make umount2 depend on UCLIBC_LINUX_SPECIFIC
Add hidden umount2 to be used in umount eventually. Rework umount to either use directly umount2 syscall or function. docs say, that mount and umount are also Linux specific Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/common/umount2.c')
-rw-r--r--libc/sysdeps/linux/common/umount2.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/common/umount2.c b/libc/sysdeps/linux/common/umount2.c
index 2cc4a2338..08e0f3388 100644
--- a/libc/sysdeps/linux/common/umount2.c
+++ b/libc/sysdeps/linux/common/umount2.c
@@ -9,9 +9,8 @@
#include <sys/syscall.h>
-#if defined __USE_GNU
-#include <sys/mount.h>
-#ifdef __NR_umount2 /* Old kernels don't have umount2 */
+#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __NR_umount2
+# include <sys/mount.h>
_syscall2(int, umount2, const char *, special_file, int, flags)
-#endif
+libc_hidden_def(umount2)
#endif