summaryrefslogtreecommitdiff
path: root/plugins/gme
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/gme')
-rw-r--r--plugins/gme/cgme.c6
1 files changed, 6 insertions, 0 deletions
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 <stdio.h>
+#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
@@ -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) {