$OpenBSD: patch-encfs_main_cpp,v 1.2 2014/01/21 15:41:27 syl Exp $
--- encfs/main.cpp.orig	Sun Nov 29 23:04:12 2009
+++ encfs/main.cpp	Mon Jan 13 13:45:50 2014
@@ -28,6 +28,8 @@
 #include <cstdio>
 #include <unistd.h>
 #include <sys/time.h>
+#include <sys/param.h>
+#include <sys/mount.h>
 #include <cerrno>
 #include <cstring>
 
@@ -51,11 +53,6 @@
 
 #include "openssl.h"
 
-// Fuse version >= 26 requires another argument to fuse_unmount, which we
-// don't have.  So use the backward compatible call instead..
-extern "C" void fuse_unmount_compat22(const char *mountpoint);
-#    define fuse_unmount fuse_unmount_compat22
-
 #include <locale.h>
 
 #include "i18n.h"
@@ -756,7 +753,11 @@ static bool unmountFS(EncFS_Context *ctx)
 	// xgroup(diag)
 	rWarning(_("Unmounting filesystem %s due to inactivity"),
 		arg->mountPoint.c_str());
-	fuse_unmount( arg->mountPoint.c_str() );
+	if (unmount( arg->mountPoint.c_str(), MNT_FORCE ) != 0)
+	{
+	    rWarning(_("Unmounting filesystem %s failed: %s"),
+	        strerror(errno) );
+	}
 	return true;
     }
 }
