Skip to content

Commit bb192ee

Browse files
committed
cpu/native: implement fputc, too
1 parent f13f288 commit bb192ee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cpu/native/syscalls.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ int putchar(int c)
230230
return _native_write(STDOUT_FILENO, &tmp, sizeof(tmp));
231231
}
232232

233+
int fputc(int c, FILE *fp)
234+
{
235+
char tmp = c;
236+
return _native_write(fileno(fp), &tmp, sizeof(tmp));
237+
}
238+
233239
int puts(const char *s)
234240
{
235241
int r;

0 commit comments

Comments
 (0)