diff --git a/emulator/strl.c b/emulator/strl.c index 6c87be9320..26668b80a3 100644 --- a/emulator/strl.c +++ b/emulator/strl.c @@ -22,6 +22,7 @@ #include +#if (!defined __APPLE__) && (!defined HAVE_STRLCPY) size_t strlcpy(char *dst, const char *src, size_t size) { size_t ret = strlen(src); @@ -39,3 +40,5 @@ size_t strlcat(char *dst, const char *src, size_t size) { return n + strlcpy(&dst[n], src, size - n); } + +#endif diff --git a/emulator/strl.h b/emulator/strl.h index 8b44e0454e..c43fd4c72e 100644 --- a/emulator/strl.h +++ b/emulator/strl.h @@ -22,7 +22,9 @@ #include +#if (!defined __APPLE__) && (!defined HAVE_STRLCPY) size_t strlcpy(char *dst, const char *src, size_t size); size_t strlcat(char *dst, const char *src, size_t size); +#endif #endif