From: "cron2 (Code Review)" Date: Sat, 11 Nov 2023 08:46:07 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641..., lstipakov@...277... Message-ID: <5d5922a2f2248e160c8cd3e87c63dd7cee72ccb8-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="dJi4q3c0T1c="; 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 , plaisthos , stipa Cc: openvpn-devel --dJi4q3c0T1c= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#2) to the change originally created by= flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/425?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by stipa 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(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/25/425/2 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: newpatchset --dJi4q3c0T1c= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #2 to the change originally cr= eated by flichtenheld.

View Change

The following approvals got outda= ted and were removed: Code-Review+2 by stipa

platform.c: Do not depend Windows build on HAVE_CHDI=
R

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

Github: fixes OpenVPN/openvpn#44= 8

Change-Id: I0c78ce452135fe2c80275da449215ba926471018
Signed-off= -by: Frank Lichtenheld <frank@...2641...>
Acked-by: Lev Stipakov &= lt;lstipakov@...277...>
Message-Id: <20231111081808.30967-1-gert@...220...= ..1296...>
URL: https://www.mail-archive.com/openvpn-devel@...1439...= ceforge.net/msg27362.html
Signed-off-by: Gert Doering <gert@...2132...= .>
---
M src/openvpn/platform.c
1 file changed, 2 insertions(+)= , 2 deletions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn =
refs/changes/25/425/2
diff --git a/src/openvpn/platform.c b/src/ope=
nvpn/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 @@
g= c_free(&gc);
return res;
#else /= * ifdef _WIN32 */
+#i= fdef HAVE_CHDIR
return chdir(dir);
-#endif
#else /* ifdef H= AVE_CHDIR */
return -1;
#endif=
+#endif
}<= /span>

/*

T= o view, visit change 425. To unsubscribe, or for help writing mail filters, visi= t 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: newpatchset
--dJi4q3c0T1c=--