git: 5d51862412a8 - main - Restrict the glibc compat cookie open functions to __BSD_VISIBLE
Date: Sun, 17 Sep 2023 15:16:30 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=5d51862412a8ad246f414c7071999b6815080884
commit 5d51862412a8ad246f414c7071999b6815080884
Author: Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-09-15 16:13:11 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-09-17 15:11:57 +0000
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 <sys/types.h>.