From 7470e8e62a4069eed23b283803787cad3a58d729 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Mon, 10 Mar 2014 15:47:30 -0700 Subject: [PATCH] ovsdb: Do not look for symbolic links for db creation in Windows. We start with not supporting symbolic links for database creation in Windows. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- ovsdb/log.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ovsdb/log.c b/ovsdb/log.c index 807b98337..48fa84791 100644 --- a/ovsdb/log.c +++ b/ovsdb/log.c @@ -91,6 +91,7 @@ ovsdb_log_open(const char *name, enum ovsdb_log_open_mode open_mode, } else if (open_mode == OVSDB_LOG_READ_WRITE) { flags = O_RDWR; } else if (open_mode == OVSDB_LOG_CREATE) { +#ifndef _WIN32 if (stat(name, &s) == -1 && errno == ENOENT && lstat(name, &s) == 0 && S_ISLNK(s.st_mode)) { /* 'name' is a dangling symlink. We want to create the file that @@ -101,6 +102,9 @@ ovsdb_log_open(const char *name, enum ovsdb_log_open_mode open_mode, } else { flags = O_RDWR | O_CREAT | O_EXCL; } +#else + flags = O_RDWR | O_CREAT | O_EXCL; +#endif } else { OVS_NOT_REACHED(); } -- 2.47.0