Created
June 7, 2024 21:58
-
-
Save nielsdos/b47a42bb29f2ababdba35b37eaa3d468 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/main/streams/cast.c b/main/streams/cast.c | |
index 238212c745..e9b5152f97 100644 | |
--- a/main/streams/cast.c | |
+++ b/main/streams/cast.c | |
@@ -46,7 +46,11 @@ typedef struct { | |
FILE *fopencookie(void *cookie, const char *mode, cookie_io_functions_t *funcs) | |
{ | |
- return funopen(cookie, funcs->reader, funcs->writer, funcs->seeker, funcs->closer); | |
+ FILE *file = funopen(cookie, funcs->reader, funcs->writer, funcs->seeker, funcs->closer); | |
+ if (file) { | |
+ setvbuf(file, NULL, _IONBF, 0); | |
+ } | |
+ return file; | |
} | |
# define HAVE_FOPENCOOKIE 1 | |
# define PHP_EMULATE_FOPENCOOKIE 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment