diff --git a/build/VStudio/winfsp_dll.vcxproj b/build/VStudio/winfsp_dll.vcxproj
index d5361b80..58cb0f3b 100644
--- a/build/VStudio/winfsp_dll.vcxproj
+++ b/build/VStudio/winfsp_dll.vcxproj
@@ -34,6 +34,7 @@
+
diff --git a/build/VStudio/winfsp_dll.vcxproj.filters b/build/VStudio/winfsp_dll.vcxproj.filters
index db769319..2ef3f38a 100644
--- a/build/VStudio/winfsp_dll.vcxproj.filters
+++ b/build/VStudio/winfsp_dll.vcxproj.filters
@@ -77,6 +77,9 @@
Source\fuse3
+
+ Source\fuse
+
diff --git a/src/dll/fuse/fuse.c b/src/dll/fuse/fuse.c
index d9dbe953..3f67a237 100644
--- a/src/dll/fuse/fuse.c
+++ b/src/dll/fuse/fuse.c
@@ -383,7 +383,7 @@ static NTSTATUS fsp_fuse_svcstart(FSP_SERVICE *Service, ULONG argc, PWSTR *argv)
/* this should always fail with ENOSYS or EINVAL */
err = f->ops.readlink("/", buf, sizeof buf);
- f->has_symlinks = -ENOSYS != err;
+ f->has_symlinks = -enosys(f->env) != err;
}
/* the FSD does not currently limit these VolumeParams fields; do so here! */
diff --git a/src/dll/fuse/library.h b/src/dll/fuse/library.h
index 96e7c962..5d840ce8 100644
--- a/src/dll/fuse/library.h
+++ b/src/dll/fuse/library.h
@@ -19,6 +19,7 @@
#define WINFSP_DLL_FUSE_LIBRARY_H_INCLUDED
#include
+#include
#include
#include
diff --git a/src/dll/fuse/shared.h b/src/dll/fuse/shared.h
new file mode 100644
index 00000000..1e214323
--- /dev/null
+++ b/src/dll/fuse/shared.h
@@ -0,0 +1,23 @@
+/**
+ * @file dll/fuse/shared.h
+ *
+ * @copyright 2015-2018 Bill Zissimopoulos
+ */
+/*
+ * This file is part of WinFsp.
+ *
+ * You can redistribute it and/or modify it under the terms of the GNU
+ * General Public License version 3 as published by the Free Software
+ * Foundation.
+ *
+ * Licensees holding a valid commercial license may use this file in
+ * accordance with the commercial license agreement provided with the
+ * software.
+ */
+
+#ifndef WINFSP_DLL_FUSE_SHARED_H_INCLUDED
+#define WINFSP_DLL_FUSE_SHARED_H_INCLUDED
+
+#define enosys(env) ('C' == (env)->environment ? 88 : 40)
+
+#endif
diff --git a/src/dll/fuse3/library.h b/src/dll/fuse3/library.h
index 5d5983e5..459721ef 100644
--- a/src/dll/fuse3/library.h
+++ b/src/dll/fuse3/library.h
@@ -19,6 +19,7 @@
#define WINFSP_DLL_FUSE3_LIBRARY_H_INCLUDED
#include
+#include
#include
#undef FUSE_H_
#undef FUSE_COMMON_H_