aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/vtls/openssl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 4659c7997..6d9e81d3b 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -948,7 +948,11 @@ static int Curl_ossl_init(void)
if(keylog_file_name && !keylog_file_fp) {
keylog_file_fp = fopen(keylog_file_name, FOPEN_APPENDTEXT);
if(keylog_file_fp) {
+#ifdef WIN32
+ if(setvbuf(keylog_file_fp, NULL, _IONBF, 0)) {
+#else
if(setvbuf(keylog_file_fp, NULL, _IOLBF, 4096)) {
+#endif
fclose(keylog_file_fp);
keylog_file_fp = NULL;
}