diff --git a/options/posix/generic/strings-stubs.cpp b/options/posix/generic/strings-stubs.cpp index cb602dc75f..524c424406 100644 --- a/options/posix/generic/strings-stubs.cpp +++ b/options/posix/generic/strings-stubs.cpp @@ -93,6 +93,14 @@ int strncasecmp(const char *a, const char *b, size_t size) { } // Marked as obsolete in posix 2008 but used by at least tracker +int bcmp(const void *s1, const void *s2, size_t n) { + return memcmp(s1, s2, n); +} + +void bcopy(const void *s1, void *s2, size_t n) { + memmove(s2, s1, n); +} + void bzero(void *s, size_t n) { memset(s, 0, n); } diff --git a/options/posix/include/strings.h b/options/posix/include/strings.h index e194608113..a21c3d7f30 100644 --- a/options/posix/include/strings.h +++ b/options/posix/include/strings.h @@ -17,7 +17,9 @@ int ffs(int word); int strcasecmp(const char *a, const char *b); int strncasecmp(const char *a, const char *b, size_t size); -// Marked as obsolete in posix 2008 but used by at least tracker +/* Marked as obsolete in posix 2008 but used by at least tracker */ +int bcmp(const void *s1, const void *s2, size_t n); +void bcopy(const void *s1, void *s2, size_t n); void bzero(void *s, size_t n); #endif /* !__MLIBC_ABI_ONLY */