From: "cron2 (Code Review)" Date: Sat, 11 Nov 2023 08:46:09 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277... Message-ID: <5d5922a2f2248e160c8cd3e87c63dd7cee72ccb8-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="tU5xaiY/Vc4="; charset=UTF-8 Subject: [Openvpn-devel] [XS] Change in openvpn[master]: platform.c: Do not depend Windows build on HAVE_CHDIR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: flichtenheld Cc: stipa , plaisthos , openvpn-devel --tU5xaiY/Vc4= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/42= 5?usp=3Demail ) Change subject: platform.c: Do not depend Windows build on HAVE_CHDIR ...................................................................... platform.c: Do not depend Windows build on HAVE_CHDIR 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. Github: fixes OpenVPN/openvpn#448 Change-Id: I0c78ce452135fe2c80275da449215ba926471018 Signed-off-by: Frank Lichtenheld Acked-by: Lev Stipakov Message-Id: <20231111081808.30967-1-gert@...1296...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27= 362.html Signed-off-by: Gert Doering --- M src/openvpn/platform.c 1 file changed, 2 insertions(+), 2 deletions(-) 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 =3D 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 } /* -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/425?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I0c78ce452135fe2c80275da449215ba926471018 Gerrit-Change-Number: 425 Gerrit-PatchSet: 2 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-Reviewer: stipa Gerrit-CC: cron2 Gerrit-CC: openvpn-devel Gerrit-MessageType: merged --tU5xaiY/Vc4= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 submitted this change.

View Change

platform.c: Do not depend Windows build on HAV=
E_CHDIR

This broke in the CMake build since previously we
just al= ways set HAVE_CHDIR to 1 in the MSVC build.
But actually the code should= just not check HAVE_CHDIR
on Windows.

Github: fixes OpenVPN/open= vpn#448

Change-Id: I0c78ce452135fe2c80275da449215ba926471018
Sign= ed-off-by: Frank Lichtenheld <frank@...2641...>
Acked-by: Lev Stip= akov <lstipakov@...277...>
Message-Id: <20231111081808.30967-1-= gert@...1296...>
URL: https://www.mail-archive.com/openvpn-devel@...1514...= s.sourceforge.net/msg27362.html
Signed-off-by: Gert Doering <gert@...493...= 1296...>
---
M src/openvpn/platform.c
1 file changed, 2 inserti= ons(+), 2 deletions(-)

diff --git a/src/openvpn/platform.c b/src/openvpn/platform.c
<= span>index 32c4fe6..62acabe 100644
--- a/src/openvpn/platfo= rm.c
+++ b/src/openvpn/platform.c
@@ -392,7= +392,6 @@
int
platform_chdir(const char = *dir)
{
+#ifdef HAVE_CHDIR
return chdir(dir);
-#endif
#else /* ifdef HAVE_CHDIR */
= return -1;
#endif
+#endif
}

<= span> /*

To view, visit change 425. To unsub= scribe, or for help writing mail filters, visit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I0c78ce452135fe2c80275da4492= 15ba926471018
Gerrit-Change-Number: 425
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-Reviewer: stipa <lstipakov@...277...= >
Gerrit-CC: cron2 <gert@...1296...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: merged
--tU5xaiY/Vc4=--