summaryrefslogtreecommitdiff
path: root/src/mbgl/util/uv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/util/uv.cpp')
-rw-r--r--src/mbgl/util/uv.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mbgl/util/uv.cpp b/src/mbgl/util/uv.cpp
index 7aa5bad0cf..a993e6b962 100644
--- a/src/mbgl/util/uv.cpp
+++ b/src/mbgl/util/uv.cpp
@@ -22,4 +22,12 @@ std::string cwd() {
#endif
}
+const char *getFileRequestError(uv_fs_t *req) {
+#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10
+ return uv_strerror(uv_last_error(req->loop));
+#else
+ return uv_strerror(int(req->result));
+#endif
+}
+
}