summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2017-12-15 15:10:26 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2018-01-08 14:44:19 +0200
commit1cdd5a5eef622b6f18aea00043b54c3b684ec34c (patch)
tree30b84dd3aa3dee05b5cecce0dc452a38512504a7
parent84e2e0c3da992c94957617073560dcecba7d4328 (diff)
downloadqtlocation-mapboxgl-1cdd5a5eef622b6f18aea00043b54c3b684ec34c.tar.gz
[windows][core] Define S_ISDIR when not defined
-rw-r--r--platform/default/local_file_source.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/default/local_file_source.cpp b/platform/default/local_file_source.cpp
index 21a291d8d4..21803d0935 100644
--- a/platform/default/local_file_source.cpp
+++ b/platform/default/local_file_source.cpp
@@ -9,7 +9,10 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <unistd.h>
+
+#if defined(_WINDOWS) && !defined(S_ISDIR)
+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+#endif
namespace {