linux-build: use host <strings.h> for bcopy/bcmp/bzero on the POSIX port

glibc's <strings.h> (pulled in transitively, e.g. via _GNU_SOURCE in
port/src/crash.c) declares these with size_t sizes; the N64 prototypes
here use int, which GCC 14 rejects as conflicting types. On
PORT && !_WIN32 include <strings.h> and drop the local decls. Windows
(PORT+_WIN32) and the N64 build (no PORT) keep the original prototypes
unchanged; Windows build verified green (239/239).
This commit is contained in:
James Dansereau committed 2026-09-02 21:57:24 -04:00
1 parent 97b0539ef7
commit 999bca81f5
1 file changed
+7
+7
View File
@@ -980,9 +980,16 @@ extern void osAckRamromWrite(void);
/* byte string operations */
#if defined(PORT) && !defined(_WIN32)
/* On the Linux/macOS port these resolve to the host libc; glibc <strings.h>
* declares them with size_t sizes, which conflict with the N64 `int`
* prototypes below (GCC 14 hard error). Use the host declarations. */
#include <strings.h>
#else
extern void bcopy(const void *, void *, int);
extern int bcmp(const void *, const void *, int);
extern void bzero(void *, int);
#endif
/* Miscellaneous operations */