summaryrefslogtreecommitdiff
path: root/payloads/libpayload/arch/mips/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/arch/mips/string.c')
-rw-r--r--payloads/libpayload/arch/mips/string.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/payloads/libpayload/arch/mips/string.c b/payloads/libpayload/arch/mips/string.c
index 0f0c7c3529..0563cf82ac 100644
--- a/payloads/libpayload/arch/mips/string.c
+++ b/payloads/libpayload/arch/mips/string.c
@@ -70,3 +70,13 @@ void *memset(void *s, int c, size_t n)
return s;
}
+
+int memcmp(const void *s1, const void *s2, size_t n)
+{
+ size_t i;
+
+ for (i = 0; i < n; i++)
+ if (((u8 *)s1)[i] != ((u8 *)s2)[i])
+ return ((u8 *)s1)[i] - ((u8 *)s2)[i];
+ return 0;
+}