]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Add -lpathcch for mingw32 builds using autotools
authorSelva Nair <selva.nair@gmail.com>
Fri, 31 Oct 2025 09:23:52 +0000 (10:23 +0100)
committerGert Doering <gert@greenie.muc.de>
Fri, 31 Oct 2025 09:37:32 +0000 (10:37 +0100)
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.

Github: closes OpenVPN/openvpn#885

Change-Id: Ifea896e722635a471cc01f930bc1e5d0f2c165be
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1334
Message-Id: <20251031092427.19824-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg34095.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
configure.ac
src/openvpnserv/Makefile.am

index 8f3c01dab82dea02a9d2d2c6e6f4f1ac80468959..3117e132345e2b1bea2bafb782cee2f2c95884e8 100644 (file)
@@ -1383,6 +1383,17 @@ if test "${enable_pkcs11}" = "yes"; then
        fi
 fi
 
+if test "${WIN32}" == "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 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.
index a27fbbffb9584bb4fa25b9b3bf8150d74811f06c..f45d7701db9538deb29ede504fe855bdc02c20b8 100644 (file)
@@ -27,7 +27,7 @@ openvpnserv_CFLAGS = \
        -D_WIN32_WINNT=_WIN32_WINNT_VISTA
 openvpnserv_LDADD = \
        -ladvapi32 -luserenv -liphlpapi -lfwpuclnt -lrpcrt4 \
-       -lshlwapi -lnetapi32 -lws2_32 -lntdll -lole32
+       -lshlwapi -lnetapi32 -lws2_32 -lntdll -lole32 -lpathcch
 noinst_DATA = \
        MSG00409.bin eventmsg.h eventmsg.rc openvpnservmsg.dll
 BUILT_SOURCES = \