summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/rbcodec/platform.h4
-rw-r--r--lib/rbcodec/rbcodecplatform-unix.h6
-rw-r--r--lib/rbcodec/test/SOURCES3
-rw-r--r--lib/rbcodec/test/warble.c12
4 files changed, 25 insertions, 0 deletions
diff --git a/lib/rbcodec/platform.h b/lib/rbcodec/platform.h
index 7a0c87fa9c..febda44ca0 100644
--- a/lib/rbcodec/platform.h
+++ b/lib/rbcodec/platform.h
@@ -66,6 +66,10 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
# define logf(...) do { } while (0)
# endif
+# ifndef panicf
+# define panicf(...) do { } while (0)
+# endif
+
#endif
#ifndef ATTRIBUTE_PRINTF
diff --git a/lib/rbcodec/rbcodecplatform-unix.h b/lib/rbcodec/rbcodecplatform-unix.h
index 4ed25f44e8..2df0a50221 100644
--- a/lib/rbcodec/rbcodecplatform-unix.h
+++ b/lib/rbcodec/rbcodecplatform-unix.h
@@ -64,6 +64,12 @@ off_t filesize(int fd);
putc('\n', stderr); \
} while (0)
#endif
+#ifndef panicf
+#define panicf(...) do { fprintf(stderr, __VA_ARGS__); \
+ putc('\n', stderr); \
+ exit(-1); \
+ } while (0)
+#endif
#endif
*/
diff --git a/lib/rbcodec/test/SOURCES b/lib/rbcodec/test/SOURCES
index 7afee84ae6..7b535f0fe0 100644
--- a/lib/rbcodec/test/SOURCES
+++ b/lib/rbcodec/test/SOURCES
@@ -3,3 +3,6 @@ warble.c
../../../firmware/common/unicode.c
../../../firmware/common/structec.c
../../../firmware/common/pathfuncs.c
+../../../firmware/common/crc32.c
+../../../firmware/buflib.c
+../../../firmware/core_alloc.c
diff --git a/lib/rbcodec/test/warble.c b/lib/rbcodec/test/warble.c
index 8f11b9b56e..9cb7cdfe07 100644
--- a/lib/rbcodec/test/warble.c
+++ b/lib/rbcodec/test/warble.c
@@ -33,6 +33,7 @@
#include <unistd.h>
#include "buffering.h" /* TYPE_PACKET_AUDIO */
#include "kernel.h"
+#include "core_alloc.h"
#include "codecs.h"
#include "dsp_core.h"
#include "metadata.h"
@@ -70,6 +71,16 @@ void debugf(const char *fmt, ...)
va_end(ap);
}
+void panicf(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ exit (-1);
+}
+
int find_first_set_bit(uint32_t value)
{
if (value == 0)
@@ -888,6 +899,7 @@ int main(int argc, char **argv)
print_help(argv[0]);
exit(1);
}
+ core_allocator_init();
playback_init();
} else {
if (argc > 1)