diff options
author | William Wilgus <wilgus.william@gmail.com> | 2023-11-19 13:03:25 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2023-11-19 13:03:25 -0500 |
commit | 58707b0429595f7b82f269879b8db9063d1368ac (patch) | |
tree | 95bbae0effbc5cfa38c47545613d65a7a21fb7ee | |
parent | 263fc8b98fab49be32aa26343a7048dcbc76b1ec (diff) | |
download | rockbox-58707b0429595f7b82f269879b8db9063d1368ac.tar.gz rockbox-58707b0429595f7b82f269879b8db9063d1368ac.zip |
[FIX_RED] strcmp missing on microtar.c ??
Change-Id: I55110433dac770896155061ad4572252a6f3a374
-rw-r--r-- | lib/microtar/src/microtar.c | 13 |
1 files changed, 13 insertions, 0 deletions
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 @@ | |||
25 | #include <limits.h> | 25 | #include <limits.h> |
26 | #include <string.h> | 26 | #include <string.h> |
27 | 27 | ||
28 | #ifndef strcmp | ||
29 | #define strcmp my_strcmp | ||
30 | static int my strcmp(const char *s1, const char *s2) | ||
31 | { | ||
32 | while (*s1 != '\0' && *s1 == *s2) { | ||
33 | s1++; | ||
34 | s2++; | ||
35 | } | ||
36 | |||
37 | return ((*(unsigned char *) s1) - (*(unsigned char *) s2)); | ||
38 | } | ||
39 | #endif /*FIX ME*/ | ||
40 | |||
28 | #ifdef ROCKBOX | 41 | #ifdef ROCKBOX |
29 | /* Rockbox lacks strncpy in its libc */ | 42 | /* Rockbox lacks strncpy in its libc */ |
30 | #define strncpy my_strncpy | 43 | #define strncpy my_strncpy |