From ada25ec4cca976312f646ad5898ef13ded249dad Mon Sep 17 00:00:00 2001 From: Evgeny Date: Sun, 15 Feb 2026 04:36:47 +0300 Subject: [PATCH] Add -ladvapi32 for Windows CryptGenRandom support --- src/Makefile.am | 2 +- tests/Makefile.am | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 2c995dac..ff330937 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,7 +21,7 @@ utun_CORE_SOURCES = \ # Platform-specific TUN sources if OS_WINDOWS utun_TUN_SOURCES = tun_windows.c -utun_TUN_LIBS = -liphlpapi -lws2_32 +utun_TUN_LIBS = -liphlpapi -lws2_32 -ladvapi32 else utun_TUN_SOURCES = tun_linux.c utun_TUN_LIBS = diff --git a/tests/Makefile.am b/tests/Makefile.am index 59e5504b..75ae33f0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -78,9 +78,9 @@ ETCP_FULL_OBJS = \ # Common libraries (libuasync.a from lib directory) COMMON_LIBS = $(top_builddir)/lib/libuasync.a -lpthread $(WIN_LIBS) -# Windows-specific libraries +# Windows-specific libraries (advapi32 for CryptGenRandom, ws2_32 for sockets) if OS_WINDOWS -WIN_LIBS = -lws2_32 -liphlpapi +WIN_LIBS = -lws2_32 -liphlpapi -ladvapi32 else WIN_LIBS = endif