From 23c2f35e6bba40dd601117ebd4f69c09548badbb Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Fri, 9 May 2014 21:15:38 +0200 Subject: gme: android build fix --- plugins/gme/cgme.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'plugins/gme') diff --git a/plugins/gme/cgme.c b/plugins/gme/cgme.c index 557ec13f..712643e2 100644 --- a/plugins/gme/cgme.c +++ b/plugins/gme/cgme.c @@ -25,6 +25,7 @@ # include "../../config.h" #endif #include +#include #include #include #include @@ -84,8 +85,13 @@ read_gzfile (const char *fname, char **buffer, int *size) { tmp = "/tmp"; } char nm[PATH_MAX]; +#ifdef ANDROID + snprintf (nm, sizeof (nm), "%s/ddbgmeXXXXXX", tmp); + fd = mkstemp (nm); +#else snprintf (nm, sizeof (nm), "%s/ddbgmeXXXXXX.vgz", tmp); fd = mkstemps (nm, 4); +#endif if (fd == -1 || sz != write (fd, buffer, sz)) { trace ("gme read_gzfile: failed to write temp file\n"); if (fd != -1) { -- cgit v1.2.3