Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: cio: mock out cio_default_root_path on Windows #32

Merged
merged 1 commit into from
Jan 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions tools/cio.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
#include <getopt.h>
#include <string.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <pwd.h>
#include <limits.h>
#include <signal.h>
#include <time.h>
#ifndef _MSC_VER
#include <pwd.h>
#endif
#ifdef __MACH__
# include <mach/clock.h>
# include <mach/mach.h>
Expand Down Expand Up @@ -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;
Expand All @@ -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)
{
Expand Down