diff options
author | David Robillard <d@drobilla.net> | 2012-08-02 00:36:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-02 00:36:14 +0000 |
commit | ae52df4ba3f6fe7fb7488791e2bd6ce84fb68f9a (patch) | |
tree | b40acf88d2088d642d7336f288fef73cb74550df /src | |
parent | 35e38f95feed56dab2e5b1b10a7939ab640e3163 (diff) | |
download | jalv-ae52df4ba3f6fe7fb7488791e2bd6ce84fb68f9a.tar.gz jalv-ae52df4ba3f6fe7fb7488791e2bd6ce84fb68f9a.tar.bz2 jalv-ae52df4ba3f6fe7fb7488791e2bd6ce84fb68f9a.zip |
Fix compilation on Windows.
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@4590 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv.c | 9 | ||||
-rw-r--r-- | src/zix/sem.h | 1 |
2 files changed, 10 insertions, 0 deletions
@@ -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; diff --git a/src/zix/sem.h b/src/zix/sem.h index 98117c8..72c7d8d 100644 --- a/src/zix/sem.h +++ b/src/zix/sem.h @@ -20,6 +20,7 @@ #ifdef __APPLE__ # include <mach/mach.h> #elif defined(_WIN32) +# include <limits.h> # include <windows.h> #else # include <semaphore.h> |