From 7101caa80b6db4256368d4938b92057a9913d622 Mon Sep 17 00:00:00 2001 From: Gabriel <44853600+gabrielmrts@users.noreply.github.com> Date: Thu, 18 Sep 2025 00:45:28 -0300 Subject: [PATCH] Fix: Extend strlcpy implementation to Linux builds (#3616) * Fix: Add libbsd dependency for Linux builds Adds conditional libbsd support to resolve strlcpy undefined reference on Linux systems. Includes proper CMake detection and header includes. * Fix: Use internal strlcpy implementation for Linux - Extend existing Windows strlcpy implementation to Linux - Remove libbsd dependency from CMakeLists.txt - Resolves undefined reference to strlcpy on glibc systems Uses the project's existing approach instead of adding external dependencies. --- src/core/libraries/network/net.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/libraries/network/net.cpp b/src/core/libraries/network/net.cpp index fb07782a0..dc58015f8 100644 --- a/src/core/libraries/network/net.cpp +++ b/src/core/libraries/network/net.cpp @@ -802,8 +802,8 @@ u16 PS4_SYSV_ABI sceNetHtons(u16 host16) { return htons(host16); } -#ifdef WIN32 -// there isn't a strlcpy function in windows so implement one +#if defined(WIN32) || defined(__linux__) +// there isn't a strlcpy function in windows/glibc so implement one u64 strlcpy(char* dst, const char* src, u64 size) { u64 src_len = strlen(src);