Fix issues with stdio needed for Lua

See #61
This commit is contained in:
Justine Tunney 2021-03-06 16:06:15 -08:00
parent c3ed8d6c7f
commit d769df3482
17 changed files with 102 additions and 155 deletions

View file

@ -28,6 +28,7 @@
*/
FILE *tmpfile(void) {
int fd;
if ((fd = mkostemps("/tmp/tmp.XXXXXX", 0, 0)) == -1) return NULL;
char template[] = "/tmp/tmp.XXXXXX";
if ((fd = mkostemps(template, 0, 0)) == -1) return NULL;
return fdopen(fd, "w+");
}