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.
This commit is contained in:
Gabriel
2025-09-18 00:45:28 -03:00
committed by GitHub
parent 6ab7aa3b18
commit 7101caa80b

View File

@@ -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);