char is unsigned on arm (signed on x86).
fetch_sig compares the result of fgetc to EOF (-1), which of course never succeeds, causing an infinite loop.
char is unsigned on arm (signed on x86).
fetch_sig compares the result of fgetc to EOF (-1), which of course never succeeds, causing an infinite loop.