Browse Source

Per http://bugs.uclibc.org/view.php?id=12:
Some newer archs only have umount2

Eric Andersen 20 years ago
parent
commit
a9c5c662d4
1 changed files with 10 additions and 0 deletions
  1. 10 0
      libc/sysdeps/linux/common/umount.c

+ 10 - 0
libc/sysdeps/linux/common/umount.c

@@ -8,5 +8,15 @@
  */
  */
 
 
 #include "syscalls.h"
 #include "syscalls.h"
+
+#ifdef __NR_umount	/* Some newer archs only have umount2 */
 #include <sys/mount.h>
 #include <sys/mount.h>
 _syscall1(int, umount, const char *, specialfile);
 _syscall1(int, umount, const char *, specialfile);
+#else
+int umount(const char *special_file)
+{
+	__set_errno(ENOSYS);
+	return -1;
+}
+#endif
+