From: Frank Lichtenheld <fr...@lichtenheld.com> This broke in the CMake build since previously we just always set HAVE_CHDIR to 1 in the MSVC build. But actually the code should just not check HAVE_CHDIR on Windows.
Change-Id: I0c78ce452135fe2c80275da449215ba926471018 Signed-off-by: Frank Lichtenheld <fr...@lichtenheld.com> Acked-by: Lev Stipakov <lstipa...@gmail.com> --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/425 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Lev Stipakov <lstipa...@gmail.com> diff --git a/src/openvpn/platform.c b/src/openvpn/platform.c index 32c4fe6..62acabe 100644 --- a/src/openvpn/platform.c +++ b/src/openvpn/platform.c @@ -392,7 +392,6 @@ int platform_chdir(const char *dir) { -#ifdef HAVE_CHDIR #ifdef _WIN32 int res; struct gc_arena gc = gc_new(); @@ -400,11 +399,12 @@ gc_free(&gc); return res; #else /* ifdef _WIN32 */ +#ifdef HAVE_CHDIR return chdir(dir); -#endif #else /* ifdef HAVE_CHDIR */ return -1; #endif +#endif } /* _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel