diff options
author | Linus Walleij <triad@df.lth.se> | 2009-05-06 21:14:41 +0000 |
---|---|---|
committer | Linus Walleij <triad@df.lth.se> | 2009-05-06 21:14:41 +0000 |
commit | 6f05002d6cfbf22777def1c79d92d4df323e5d48 (patch) | |
tree | ea97ca8deff6f8fa4bde165ed0e5674d67b8e151 /src/playlist-spl.c | |
parent | 18ed016338da66619a48817e1bcc01548f8c78fb (diff) | |
download | libmtp-6f05002d6cfbf22777def1c79d92d4df323e5d48.tar.gz |
A first host of Windows fixes from Carlo Bramini
Diffstat (limited to 'src/playlist-spl.c')
-rw-r--r-- | src/playlist-spl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/playlist-spl.c b/src/playlist-spl.c index 00757e9..de21035 100644 --- a/src/playlist-spl.c +++ b/src/playlist-spl.c @@ -21,13 +21,17 @@ * Boston, MA 02111-1307, USA. */ +#include <config.h>
+
#include <stdio.h> #include <stdlib.h> // mkstmp() #include <unistd.h> #include <errno.h> #include <sys/stat.h> #include <sys/types.h> +#ifdef HAVE_SYS_UIO_H #include <sys/uio.h> +#endif #include <fcntl.h> #include <string.h> @@ -91,6 +95,15 @@ int is_spl_playlist(PTPObjectInfo *oi) (strcmp((oi->Filename + strlen(oi->Filename) -4), ".spl") == 0); } +#ifndef HAVE_MKSTEMP +# ifdef __WIN32__ +# include <fcntl.h> +# define mkstemp(_pattern) _open(_mktemp(_pattern), _O_CREAT | _O_SHORT_LIVED | _O_EXCL) +# else +# error Missing mkstemp() function. +# endif +#endif + /** * Take an object ID, a .spl playlist on the MTP device, * and convert it to a playlist_t object. |