From e79b0c9c5d8df57119d20f57639d28df2224a76b Mon Sep 17 00:00:00 2001 From: Fujimoto Seiji Date: Fri, 18 Jan 2019 11:24:03 +0900 Subject: [PATCH] tools: cio: mock out cio_default_root_path on Windows We don't need this function for now since Windows does not have the file system support yet. In future, we'll need to implement getpwuid() using Win32 API, in order to get an equivalent path on Windows. Signed-off-by: Fujimoto Seiji --- tools/cio.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tools/cio.c b/tools/cio.c index 9d3b5a8..45d65e0 100644 --- a/tools/cio.c +++ b/tools/cio.c @@ -23,12 +23,12 @@ #include #include #include -#include -#include -#include #include #include #include +#ifndef _MSC_VER +#include +#endif #ifdef __MACH__ # include # include @@ -192,6 +192,7 @@ static int log_cb(struct cio_ctx *ctx, int level, const char *file, int line, return 0; } +#ifndef _MSC_VER static int cio_default_root_path(char *path, int size) { int len; @@ -213,6 +214,12 @@ static int cio_default_root_path(char *path, int size) return 0; } +#else +static int cio_default_root_path(char *path, int size) +{ + return -1; +} +#endif static void cio_timespec_get(struct timespec *t) {