socket-util: fsync directory for Windows.
authorGurucharan Shetty <gshetty@nicira.com>
Wed, 19 Feb 2014 16:47:56 +0000 (08:47 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Fri, 21 Feb 2014 16:17:24 +0000 (08:17 -0800)
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 <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/socket-util.c

index 357594d..506de6d 100644 (file)
@@ -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;
 }