mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-08 20:58:41 +00:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user