From a196d08dfc600615e7b3ce3f774ec4de3f0c0b19 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 20 Apr 2014 22:19:14 +0300 Subject: [PATCH] unix windows: mingw32 doesn't have realpath(), use _fullpath() instead. --- unix/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/unix/main.c b/unix/main.c index e4536f381c..4c86edeae5 100644 --- a/unix/main.c +++ b/unix/main.c @@ -394,7 +394,11 @@ int main(int argc, char **argv) { return usage(argv); } } else { +#ifdef __MINGW32__ + char *basedir = _fullpath(NULL, argv[a], _MAX_PATH); +#else char *basedir = realpath(argv[a], NULL); +#endif if (basedir == NULL) { fprintf(stderr, "%s: can't open file '%s': [Errno %d] ", argv[0], argv[1], errno); perror("");