From 58707b0429595f7b82f269879b8db9063d1368ac Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 19 Nov 2023 13:03:25 -0500 Subject: [FIX_RED] strcmp missing on microtar.c ?? Change-Id: I55110433dac770896155061ad4572252a6f3a374 --- lib/microtar/src/microtar.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/microtar/src/microtar.c b/lib/microtar/src/microtar.c index 8ab9a8c5f4..c6e80218aa 100644 --- a/lib/microtar/src/microtar.c +++ b/lib/microtar/src/microtar.c @@ -25,6 +25,19 @@ #include #include +#ifndef strcmp +#define strcmp my_strcmp +static int my strcmp(const char *s1, const char *s2) +{ + while (*s1 != '\0' && *s1 == *s2) { + s1++; + s2++; + } + + return ((*(unsigned char *) s1) - (*(unsigned char *) s2)); +} +#endif /*FIX ME*/ + #ifdef ROCKBOX /* Rockbox lacks strncpy in its libc */ #define strncpy my_strncpy -- cgit v1.2.3