+@@ -1423,7 +1423,13 @@
+ }
+ }
+
++#ifdef __ANDROID__
++ char tmpfile_template[] = "@TERMUX_PREFIX@/tmp/hunspell.XXXXXX";
++ int tmpfile_fd = mkstemp(tmpfile_template);
++ FILE *tempfile = fdopen(tmpfile_fd, "w+");
++#else
+ FILE *tempfile = tmpfile();
++#endif
+
+ if (!tempfile)
+ {
+@@ -1443,6 +1449,9 @@
+ clear();
+ refresh();
+ fclose(tempfile); //automatically deleted when closed
++#ifdef __ANDROID__
++ unlink(tmpfile_template);
++#endif
+ if (is_zipped_odf(parser, extension)) {
+ sprintf(buf, "rm %s; rmdir %s", filename, odftempdir);
+ if (system(buf) != 0)
+@@ -1493,6 +1502,9 @@
+
+ delete parser;
+ fclose(tempfile); //automatically deleted when closed
++#ifdef __ANDROID__
++ unlink(tmpfile_template);
++#endif
+ }
+
+ #endif