diff options
Diffstat (limited to 'lib/microtar/src/microtar.c')
-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 |