From 35af37a3688a7e33c89c78c3ba9f16826270030b Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 7 Jun 2024 16:58:10 -0400 Subject: set eof at EOF --- src/stdio/getc_unlocked.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/stdio/getc_unlocked.c b/src/stdio/getc_unlocked.c index 13c9f867..dccbc2e4 100644 --- a/src/stdio/getc_unlocked.c +++ b/src/stdio/getc_unlocked.c @@ -25,6 +25,7 @@ int getc_unlocked(FILE * stream) if (read(stream->fd, &c, sizeof(c)) != 1) { stream->err = 1; + stream->eof = 1; return EOF; } -- cgit v1.2.1