switch to tmpfile so it works on musl

This commit is contained in:
sam 2024-07-24 21:01:29 +12:00
parent e154997862
commit d2f4528797
2 changed files with 89 additions and 87 deletions

View file

@ -103,7 +103,9 @@ const char*
qbe_emit(Target target, const char* ssa)
{
T = target;
FILE *inf = fmemopen((void*)ssa, strlen(ssa), "r");
FILE *inf = tmpfile();
fputs(ssa, inf);
rewind(inf);
outf = tmpfile();
char* f = "-";