diff options
Diffstat (limited to 'lib/fseterr.h')
-rw-r--r-- | lib/fseterr.h | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/lib/fseterr.h b/lib/fseterr.h index b3930c5a88..16a1afeeae 100644 --- a/lib/fseterr.h +++ b/lib/fseterr.h @@ -19,19 +19,27 @@ #include <stdio.h> -#ifdef __cplusplus -extern "C" { -#endif - - /* Set the error indicator of the stream FP. The "error indicator" is set when an I/O operation on the stream fails, and is cleared (together with the "end-of-file" indicator) by clearerr (FP). */ -extern void fseterr (FILE *fp); +#if HAVE___FSETERR /* musl libc */ + +# include <stdio_ext.h> +# define fseterr(fp) __fseterr (fp) -#ifdef __cplusplus +#else + +# ifdef __cplusplus +extern "C" { +# endif + +extern void fseterr (FILE *fp); + +# ifdef __cplusplus } +# endif + #endif #endif /* _FSETERR_H */ |