From: "selvanair (Code Review)" Date: Fri, 31 Oct 2025 00:32:44 +0000 References: Reply-To: selva.nair@...277..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="9SHJQeMCvBc="; charset=UTF-8 Subject: [Openvpn-devel] [S] Change in openvpn[master]: Add -lpathcch for mingw32 builds using autotools List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --9SHJQeMCvBc= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/1334?usp=3Demail to review the following change. Change subject: Add -lpathcch for mingw32 builds using autotools ...................................................................... Add -lpathcch for mingw32 builds using autotools This was missed in commit 05a8ba8 Note: the check for PATHCCH_ENSURE_TRAILING_SLASH in configure.ac may be omitted if we build only using latest mingw32-w64 toolchain. Ubuntu 24.04 is not new enough. Change-Id: Ifea896e722635a471cc01f930bc1e5d0f2c165be Signed-off-by: Selva Nair --- M configure.ac M src/openvpnserv/Makefile.am 2 files changed, 12 insertions(+), 1 deletion(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/34/1334/1 diff --git a/configure.ac b/configure.ac index 8f3c01d..3117e13 100644 --- a/configure.ac +++ b/configure.ac @@ -1383,6 +1383,17 @@ fi fi +if test "${WIN32}" =3D=3D "yes"; then + AC_CHECK_DECLS( + [PATHCCH_ENSURE_TRAILING_SLASH], + [AC_DEFINE([HAVE_PATHCCH_ENSURE_TRAILING_SLASH], [1], [PATHCCH_ENSURE_TR= AILING_SLASH is defined])], + , + [[ + #include + ]] + ) +fi + # When testing a compiler option, we add -Werror to force # an error when the option is unsupported. This is not # required for gcc, but some compilers such as clang need it. diff --git a/src/openvpnserv/Makefile.am b/src/openvpnserv/Makefile.am index a27fbbf..f45d770 100644 --- a/src/openvpnserv/Makefile.am +++ b/src/openvpnserv/Makefile.am @@ -27,7 +27,7 @@ -D_WIN32_WINNT=3D_WIN32_WINNT_VISTA openvpnserv_LDADD =3D \ -ladvapi32 -luserenv -liphlpapi -lfwpuclnt -lrpcrt4 \ - -lshlwapi -lnetapi32 -lws2_32 -lntdll -lole32 + -lshlwapi -lnetapi32 -lws2_32 -lntdll -lole32 -lpathcch noinst_DATA =3D \ MSG00409.bin eventmsg.h eventmsg.rc openvpnservmsg.dll BUILT_SOURCES =3D \ -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1334?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings?usp=3Demail Gerrit-MessageType: newchange Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ifea896e722635a471cc01f930bc1e5d0f2c165be Gerrit-Change-Number: 1334 Gerrit-PatchSet: 1 Gerrit-Owner: selvanair Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld --9SHJQeMCvBc= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is cur= rently required from: flichtenheld, plaisthos.

selvanair would like plaisthos and flichtenheld to review this change.

V= iew Change

Add -lpathcch for mingw32 builds using auto=
tools

This was missed in commit 05a8ba8

Note: the check for P= ATHCCH_ENSURE_TRAILING_SLASH in
configure.ac may be omitted if we build = only using latest
mingw32-w64 toolchain. Ubuntu 24.04 is not new enough.=

Change-Id: Ifea896e722635a471cc01f930bc1e5d0f2c165be
Signed-off-= by: Selva Nair <selva.nair@...277...>
---
M configure.ac
M s= rc/openvpnserv/Makefile.am
2 files changed, 12 insertions(+), 1 deletion= (-)

git pull ssh://gerrit.openvpn.net:29418/open=
vpn refs/changes/34/1334/1
diff --git a/configure.ac b/configure.ac=

index 8f3c01d..3117e13 100644
--- a/config= ure.ac
+++ b/configure.ac
@@ -1383,6 +1383,= 17 @@
fi
fi

= +if test "${WIN32}" = =3D=3D "yes"; then
+ AC_CHECK_DECLS(
+ [PATHCCH_ENSURE_TRAILING_SLASH],
+ [AC_DEFINE([HAVE_PATHCCH_ENSURE_TRAILING_SLASH], [1]= , [PATHCCH_ENSURE_TRAILING_SLASH is defined])],
+ ,
+ [[
+ = #include <pathcch.h>
+ ]]
+ )
+fi
+
# When testing a compil= er option, we add -Werror to force
# an error when the opt= ion is unsupported. This is not
# required for gcc, but so= me compilers such as clang need it.
diff --git a/src/openvp= nserv/Makefile.am b/src/openvpnserv/Makefile.am
index a27fb= bf..f45d770 100644
--- a/src/openvpnserv/Makefile.am=
+++ b/src/openvpnserv/Makefile.am
@@ -27,7 +27,7 = @@
-D_WIN32_WINNT=3D_WIN32_WINNT_VISTA
o= penvpnserv_LDADD =3D \
-ladvapi32 -luserenv -liphlpapi -l= fwpuclnt -lrpcrt4 \
- -= lshlwapi -lnetapi32 -lws2_32 -lntdll -lole32
+ -lshlwapi -lnetapi32 -lws2_32 -lntdll -lole32 -lp= athcch
noinst_DATA =3D \
MSG00409.bin ev= entmsg.h eventmsg.rc openvpnservmsg.dll
BUILT_SOURCES =3D = \

To view, visit change 1334. To unsubscrib= e, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ifea896e722635a471cc01f930bc= 1e5d0f2c165be
Gerrit-Change-Number: 1334
Gerrit-PatchSet: 1
Gerrit-Owner: selvanair <selva.nair@...1354...= ..>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
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-Attention: flichtenheld <frank@...2375...= 41...>
= --9SHJQeMCvBc=--