From 5d51862412a8ad246f414c7071999b6815080884 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 15 Sep 2023 10:13:11 -0600 Subject: [PATCH] Restrict the glibc compat cookie open functions to __BSD_VISIBLE Sponsored by: Netflix --- include/stdio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/stdio.h b/include/stdio.h index b7c412c81da7..9881b3f07329 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -415,6 +415,7 @@ FILE *funopen(const void *, #define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) #define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) +#if __BSD_VISIBLE typedef __ssize_t cookie_read_function_t(void *, char *, size_t); typedef __ssize_t cookie_write_function_t(void *, const char *, size_t); typedef int cookie_seek_function_t(void *, off64_t *, int); @@ -426,6 +427,7 @@ typedef struct { cookie_close_function_t *close; } cookie_io_functions_t; FILE *fopencookie(void *, const char *, cookie_io_functions_t); +#endif /* * Portability hacks. See .