diff options
author | David Robillard <d@drobilla.net> | 2012-04-06 21:16:03 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-06 21:16:03 +0000 |
commit | 807b92ca7157d0de52a010ca23e6587e5ac4b641 (patch) | |
tree | 20e282bb01fe06df782bb72831d52dff70462134 /src | |
parent | a8f6cb4e48371ace96a462134b72798020bdfee5 (diff) | |
download | lilv-807b92ca7157d0de52a010ca23e6587e5ac4b641.tar.gz lilv-807b92ca7157d0de52a010ca23e6587e5ac4b641.tar.bz2 lilv-807b92ca7157d0de52a010ca23e6587e5ac4b641.zip |
Fix compilation on Windows.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4150 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/util.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -28,7 +28,9 @@ #include <stdlib.h> #include <string.h> -#ifdef _MSC_VER +#ifdef _WIN32 +# define _WIN32_WINNT 0x0600 /* for CreateSymbolicLink */ +# include <windows.h> # include <direct.h> # include <io.h> # define F_OK 0 @@ -345,7 +347,6 @@ lilv_size_mtime(const char* path, off_t* size, time_t* time) struct stat buf; if (stat(path, &buf)) { LILV_ERRORF("stat(%s) (%s)\n", path, strerror(errno)); - *size = *time = 0; } if (size) { @@ -370,8 +371,8 @@ update_latest(const char* path, const char* name, void* data) char* entry_path = lilv_path_join(path, name); unsigned num; if (sscanf(entry_path, latest->pattern, &num) == 1) { - off_t entry_size; - time_t entry_time; + off_t entry_size = 0; + time_t entry_time = 0; lilv_size_mtime(entry_path, &entry_size, &entry_time); if (entry_size == latest->orig_size && entry_time >= latest->time) { free(latest->latest); |