mirror of
https://github.com/lucannez64/darling-lol.git
synced 2026-10-26 19:47:42 +00:00
39 lines
896 B
Diff
39 lines
896 B
Diff
diff --git a/cctools/ld64/src/3rd/strlcpy.h b/cctools/ld64/src/3rd/strlcpy.h
|
|
--- a/cctools/ld64/src/3rd/strlcpy.h
|
|
+++ b/cctools/ld64/src/3rd/strlcpy.h
|
|
@@ -7,8 +7,15 @@
|
|
extern "C" {
|
|
#endif
|
|
#include <stddef.h>
|
|
+#include <string.h>
|
|
|
|
+#if defined(__GLIBC__)
|
|
+# if !__GLIBC_PREREQ(2, 38)
|
|
size_t strlcpy(char *dst, const char *src, size_t siz);
|
|
+# endif
|
|
+#else
|
|
+size_t strlcpy(char *dst, const char *src, size_t siz);
|
|
+#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
diff --git a/cctools/ld64/src/3rd/strlcat.h b/cctools/ld64/src/3rd/strlcat.h
|
|
--- a/cctools/ld64/src/3rd/strlcat.h
|
|
+++ b/cctools/ld64/src/3rd/strlcat.h
|
|
@@ -7,8 +7,15 @@
|
|
extern "C" {
|
|
#endif
|
|
#include <stddef.h>
|
|
+#include <string.h>
|
|
|
|
+#if defined(__GLIBC__)
|
|
+# if !__GLIBC_PREREQ(2, 38)
|
|
size_t strlcat(char *dst, const char *src, size_t siz);
|
|
+# endif
|
|
+#else
|
|
+size_t strlcat(char *dst, const char *src, size_t siz);
|
|
+#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|