aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am8
-rw-r--r--lib/mount.c6
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 983c01f..40f7014 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -11,6 +11,12 @@ else
mount_source = mount.c
endif
+if ICONV
+iconv_source = modules/iconv.c
+else
+iconv_source =
+endif
+
libfuse_la_SOURCES = \
fuse.c \
fuse_i.h \
@@ -25,7 +31,7 @@ libfuse_la_SOURCES = \
fuse_signals.c \
helper.c \
modules/subdir.c \
- modules/iconv.c \
+ $(iconv_source) \
$(mount_source)
libfuse_la_LDFLAGS = @libfuse_libs@ -version-number 2:7:0 \
diff --git a/lib/mount.c b/lib/mount.c
index cdfd7d2..5232737 100644
--- a/lib/mount.c
+++ b/lib/mount.c
@@ -259,13 +259,13 @@ static int receive_fd(int fd)
void fuse_kern_unmount(const char *mountpoint, int fd)
{
+ int res;
int pid;
if (!mountpoint)
return;
if (fd != -1) {
- int res;
struct pollfd pfd;
pfd.fd = fd;
@@ -277,6 +277,10 @@ void fuse_kern_unmount(const char *mountpoint, int fd)
return;
}
+ res = umount2(mountpoint, 2);
+ if (res == 0)
+ return;
+
pid = fork();
if(pid == -1)
return;