From cbf414e50163de1b2488e940bd87efe6496cdd67 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Wed, 19 Feb 2014 08:47:56 -0800 Subject: [PATCH] socket-util: fsync directory for Windows. There is no corresponding function for Windows. open() does not work on directories. There is a function _commit(fd), but that is only meant for files. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- lib/socket-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/socket-util.c b/lib/socket-util.c index 357594d0a..506de6d2d 100644 --- a/lib/socket-util.c +++ b/lib/socket-util.c @@ -1033,6 +1033,7 @@ int fsync_parent_dir(const char *file_name) { int error = 0; +#ifndef _WIN32 char *dir; int fd; @@ -1054,6 +1055,7 @@ fsync_parent_dir(const char *file_name) VLOG_ERR("%s: open failed (%s)", dir, ovs_strerror(error)); } free(dir); +#endif return error; } -- 2.43.0