From: "flichtenheld (Code Review)" Date: Fri, 10 Nov 2023 17:38:39 +0000 References: Reply-To: frank@...2641..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="+c0cuNXNlcU="; 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: plaisthos Cc: openvpn-devel --+c0cuNXNlcU= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: plaisthos. Hello plaisthos, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/425?usp=3Demail to review the following change. 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. Change-Id: I0c78ce452135fe2c80275da449215ba926471018 Signed-off-by: Frank Lichtenheld --- M src/openvpn/platform.c 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/25/425/1 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: 1 Gerrit-Owner: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-MessageType: newchange --+c0cuNXNlcU= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: plaisthos.

flichtenheld would like plaisthos to review this change.

Vi= ew Change

platform.c: Do not depend Windows build on HAVE_CHDIR

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

Change-Id: I0c78ce452135fe2c80275da449215= ba926471018
Signed-off-by: Frank Lichtenheld <frank@...2641...>---
M src/openvpn/platform.c
1 file changed, 2 insertions(+), 2 dele= tions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/cha=
nges/25/425/1
diff --git a/src/openvpn/platform.c b/src/openvpn/pla=
tform.c
index 32c4fe6..62acabe 100644
--- a= /src/openvpn/platform.c
+++ b/src/openvpn/platform.c=
@@ -392,7 +392,6 @@
int
platfor= m_chdir(const char *dir)
{
-#ifdef HAVE_CHDIR
#ifdef _WIN32
int res;
struct gc_arena gc =3D gc_ne= w();
@@ -400,11 +399,12 @@
gc_free(&am= p;gc);
return res;
#else /* ifdef _W= IN32 */
+#ifdef HAVE_= CHDIR
return chdir(dir);
-#endif
#else /* ifdef HAVE_CHDIR = */
return -1;
#endif
+#endif
}
=
/*

To view, vi= sit chang= e 425. To unsubscribe, 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: 1
Gerrit-Owner: flichtenheld <frank@...2723...= .>
Gerrit-Reviewer: plaisthos <arne-openvpn@...1186...= .1227...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-Attention: plaisthos <arne-openvpn@...220...= ..1227...>
Gerrit-MessageType: newchange
--+c0cuNXNlcU=--