[ovs-dev] [PATCH 08/10] test-ovsdb: Fix setvbuf incompatibility on Windows.

Gurucharan Shetty shettyg at nicira.com
Tue May 13 16:03:22 UTC 2014


setvbuf() in Windows treats _IOLBF to be the same as _IOFBF. So
we cannot have size as zero (otherwise, there is a crash).

Workaround is to set _IONBF. I don't see unit test failures
because of the change.

Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 tests/test-ovsdb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
index 29d7542..ebb24c0 100644
--- a/tests/test-ovsdb.c
+++ b/tests/test-ovsdb.c
@@ -1893,7 +1893,7 @@ do_idl(int argc, char *argv[])
         rpc = NULL;
     }
 
-    setvbuf(stdout, NULL, _IOLBF, 0);
+    setvbuf(stdout, NULL, _IONBF, 0);
 
     symtab = ovsdb_symbol_table_create();
     for (i = 2; i < argc; i++) {
-- 
1.7.9.5




More information about the dev mailing list