From 7a1f842b91af4f916501eaea991b897e3db4c502 Mon Sep 17 00:00:00 2001 From: Mosder Date: Mon, 28 Sep 2026 13:27:35 +0200 Subject: refactor: prefixed compat functions (and added a macro to libc implementations - if they exist), so they do not take reserved names anymore --- compat/compat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compat/compat.c') diff --git a/compat/compat.c b/compat/compat.c index 37432bf..4d8526c 100644 --- a/compat/compat.c +++ b/compat/compat.c @@ -3,7 +3,7 @@ #ifdef NO_STRDUP #include #include -char *strdup(const char *s) { +char *mos_strdup(const char *s) { char *s2 = malloc(strlen(s) + 1); if (!s2) return NULL; @@ -13,7 +13,7 @@ char *strdup(const char *s) { #endif // NO_STRDUP #ifdef NO_MEMMEM -void *memmem(const void *h, size_t h_size, const void *n, size_t n_size) { +void *mos_memmem(const void *h, size_t h_size, const void *n, size_t n_size) { if (n_size == 0) return (void *)h; if (n_size > h_size) -- cgit v1.2.3