aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/collada-dom/fix-emscripten.patch
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/collada-dom/fix-emscripten.patch')
-rw-r--r--vcpkg/ports/collada-dom/fix-emscripten.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/vcpkg/ports/collada-dom/fix-emscripten.patch b/vcpkg/ports/collada-dom/fix-emscripten.patch
new file mode 100644
index 0000000..ce70df3
--- /dev/null
+++ b/vcpkg/ports/collada-dom/fix-emscripten.patch
@@ -0,0 +1,23 @@
+diff --git a/dom/src/dae/daeUtils.cpp b/dom/src/dae/daeUtils.cpp
+index 7e3dc9a..dc94b5b 100644
+--- a/dom/src/dae/daeUtils.cpp
++++ b/dom/src/dae/daeUtils.cpp
+@@ -152,7 +152,7 @@ char cdom::getFileSeparator() {
+ const string& cdom::getSystemTmpDir() {
+ #ifdef WIN32
+ static string tmpDir = string(getenv("TMP")) + getFileSeparator();
+-#elif defined(__linux__) || defined(__linux)
++#elif defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__)
+ static string tmpDir = "/tmp/";
+ #elif defined __APPLE_CC__
+ static string tmpDir = string(getenv("TMPDIR"));
+@@ -171,7 +171,7 @@ string cdom::getRandomFileName() {
+ std::string tmp(tmpnam(&tmpbuffer[0]));
+ #ifdef WIN32
+ randomSegment = tmp.substr(tmp.find_last_of('\\')+1);
+-#elif defined(__linux__) || defined(__linux)
++#elif defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__)
+ randomSegment = tmp.substr(tmp.find_last_of('/')+1);
+ #elif defined __APPLE_CC__
+ randomSegment = tmp.substr(tmp.find_last_of('/')+1);
+ \ No newline at end of file