aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/jalv.c')
-rw-r--r--src/jalv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/jalv.c b/src/jalv.c
index 3ce2266..be047f7 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -27,6 +27,10 @@
#include <sys/types.h>
#include <unistd.h>
+#ifdef _WIN32
+# include <io.h> /* for _mktemp */
+#endif
+
#include "jalv_config.h"
#include "jalv_internal.h"
@@ -757,9 +761,14 @@ main(int argc, char** argv)
host.urids.time_frame = symap_map(host.symap, LV2_TIME__frame);
host.urids.time_speed = symap_map(host.symap, LV2_TIME__speed);
+#ifdef _WIN32
+ host.temp_dir = jalv_strdup("jalvXXXXXX");
+ _mktemp(host.temp_dir);
+#else
char* template = jalv_strdup("/tmp/jalv-XXXXXX");
host.temp_dir = jalv_strjoin(mkdtemp(template), "/");
free(template);
+#endif
LV2_State_Make_Path make_path = { &host, jalv_make_path };
make_path_feature.data = &make_path;