memdebug: fix MSVC crash with -DMEMDEBUG_LOG_SYNC
authorGisle Vanem <gvanem@yahoo.no>
Mon, 30 May 2016 09:43:04 +0000 (11:43 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 30 May 2016 09:43:04 +0000 (11:43 +0200)
Fixes #828

lib/memdebug.c

index 1618bbaf31d3f02bdafdd4735c2a8bbc56196390..ccbf461be6113b6140235b8b0c0b60b26dc134f1 100644 (file)
@@ -119,7 +119,7 @@ void curl_memdebug(const char *logname)
       logfile = stderr;
 #ifdef MEMDEBUG_LOG_SYNC
     /* Flush the log file after every line so the log isn't lost in a crash */
-    setvbuf(logfile, (char *)NULL, _IOLBF, 0);
+    setbuf(logfile, (char *)NULL);
 #endif
   }
 }