From 2914b74aa4b498c1038bc41fed3ef17fe1152480 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 24 Jul 2017 20:16:25 +0200 Subject: [PATCH] mescc: Tinycc support: fread stub. * mlibc/include/stdio.h (fread): Declare. * mlibc/libc-mes+tcc.c (fread): Add stub. --- mlibc/include/stdio.h | 1 + mlibc/libc-mes+tcc.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/mlibc/include/stdio.h b/mlibc/include/stdio.h index 19658d2d..67ff1b17 100644 --- a/mlibc/include/stdio.h +++ b/mlibc/include/stdio.h @@ -103,6 +103,7 @@ int fflush (FILE *stream); int fprintf (FILE *stream, char const *format, ...); int fputc (int c, int fd); int fputs (char const* s, int fd); +size_t fread (void *ptr, size_t size, size_t nmemb, FILE *stream); int fseek (FILE *stream, long offset, int whence); long ftell (FILE *stream); size_t fwrite (void const *ptr, size_t size, size_t nmemb, FILE *stream); diff --git a/mlibc/libc-mes+tcc.c b/mlibc/libc-mes+tcc.c index 22dd1785..29065672 100644 --- a/mlibc/libc-mes+tcc.c +++ b/mlibc/libc-mes+tcc.c @@ -97,6 +97,12 @@ fprintf (FILE *stream, char const *format, ...) return 0; } +size_t +fread (void *ptr, size_t size, size_t nmemb, FILE *stream) +{ + return 0; +} + void free (void *ptr) {