summaryrefslogtreecommitdiff
path: root/apps/codecs/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/lib')
-rw-r--r--apps/codecs/lib/codeclib.h10
-rw-r--r--apps/codecs/lib/tlsf/src/tlsf.c2
-rw-r--r--apps/codecs/lib/tlsf/src/tlsf.h2
3 files changed, 10 insertions, 4 deletions
diff --git a/apps/codecs/lib/codeclib.h b/apps/codecs/lib/codeclib.h
index 817d86a..b7685eb 100644
--- a/apps/codecs/lib/codeclib.h
+++ b/apps/codecs/lib/codeclib.h
@@ -22,9 +22,10 @@
#ifndef __CODECLIB_H__
#define __CODECLIB_H__
+#include <inttypes.h>
+#include <string.h>
#include "config.h"
#include "codecs.h"
-#include <sys/types.h>
#include "mdct.h"
#include "fft.h"
@@ -44,6 +45,7 @@ extern unsigned char* filebuf; /* The rest of the MP3 buffer
#define calloc(x,y) codec_calloc(x,y)
#define realloc(x,y) codec_realloc(x,y)
#define free(x) codec_free(x)
+#undef alloca
#define alloca(x) __builtin_alloca(x)
void* codec_malloc(size_t size);
@@ -59,7 +61,11 @@ void *memmove(void *s1, const void *s2, size_t n);
size_t strlen(const char *s);
char *strcpy(char *dest, const char *src);
char *strcat(char *dest, const char *src);
-int strcmp(const char *, const char *);
+
+/* on some platforms strcmp() seems to be a tricky define which
+ * breaks if we write down strcmp's prototype */
+#undef strcmp
+int strcmp(const char *s1, const char *s2);
void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *));
diff --git a/apps/codecs/lib/tlsf/src/tlsf.c b/apps/codecs/lib/tlsf/src/tlsf.c
index 6d15c3a..570e472 100644
--- a/apps/codecs/lib/tlsf/src/tlsf.c
+++ b/apps/codecs/lib/tlsf/src/tlsf.c
@@ -165,7 +165,7 @@
#endif
#if defined(ROCKBOX) && defined(SIMULATOR) || !defined(ROCKBOX)
-int printf(char*, ...);
+int printf(const char* fmt, ...);
#define PRINT_MSG(fmt, args...) printf(fmt, ## args)
#define ERROR_MSG(fmt, args...) printf(fmt, ## args)
#else
diff --git a/apps/codecs/lib/tlsf/src/tlsf.h b/apps/codecs/lib/tlsf/src/tlsf.h
index 5d016f4..4feb5c4 100644
--- a/apps/codecs/lib/tlsf/src/tlsf.h
+++ b/apps/codecs/lib/tlsf/src/tlsf.h
@@ -19,7 +19,7 @@
#ifndef _TLSF_H_
#define _TLSF_H_
-#include <sys/types.h>
+#include <string.h> /* defines size_t */
extern size_t init_memory_pool(size_t, void *);
extern size_t get_used_size(void *);