summaryrefslogtreecommitdiffstats
path: root/lib/microtar/src/microtar.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/microtar/src/microtar.c')
-rw-r--r--lib/microtar/src/microtar.c13
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 @@
#include <limits.h>
#include <string.h>
+#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