From 6f05002d6cfbf22777def1c79d92d4df323e5d48 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Wed, 6 May 2009 21:14:41 +0000 Subject: A first host of Windows fixes from Carlo Bramini --- src/playlist-spl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/playlist-spl.c') 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 + #include #include // mkstmp() #include #include #include #include +#ifdef HAVE_SYS_UIO_H #include +#endif #include #include @@ -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 +# 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. -- cgit v1.2.1