summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rbcodec/rbcodecplatform-unix.h8
-rw-r--r--lib/rbcodec/test/SOURCES2
-rw-r--r--lib/rbcodec/test/file.h4
-rw-r--r--lib/rbcodec/test/warble.c7
4 files changed, 12 insertions, 9 deletions
diff --git a/lib/rbcodec/rbcodecplatform-unix.h b/lib/rbcodec/rbcodecplatform-unix.h
index 5e65be3ae4..4ed25f44e8 100644
--- a/lib/rbcodec/rbcodecplatform-unix.h
+++ b/lib/rbcodec/rbcodecplatform-unix.h
@@ -50,15 +50,7 @@
#endif
/* filesize */
-#include <sys/stat.h>
off_t filesize(int fd);
-/*
-static inline off_t filesize(int fd) {
- struct stat st;
- fstat(fd, &st);
- return st.st_size;
-}
-*/
/* snprintf */
#include <stdio.h>
diff --git a/lib/rbcodec/test/SOURCES b/lib/rbcodec/test/SOURCES
index d1413c758a..7afee84ae6 100644
--- a/lib/rbcodec/test/SOURCES
+++ b/lib/rbcodec/test/SOURCES
@@ -2,4 +2,4 @@ warble.c
../../../firmware/common/strlcpy.c
../../../firmware/common/unicode.c
../../../firmware/common/structec.c
-../../../uisimulator/common/io.c
+../../../firmware/common/pathfuncs.c
diff --git a/lib/rbcodec/test/file.h b/lib/rbcodec/test/file.h
new file mode 100644
index 0000000000..b673fa8f93
--- /dev/null
+++ b/lib/rbcodec/test/file.h
@@ -0,0 +1,4 @@
+#undef MAX_PATH
+#define MAX_PATH 260
+#include <unistd.h>
+#include <fcntl.h>
diff --git a/lib/rbcodec/test/warble.c b/lib/rbcodec/test/warble.c
index 6c8442ae26..8f11b9b56e 100644
--- a/lib/rbcodec/test/warble.c
+++ b/lib/rbcodec/test/warble.c
@@ -77,6 +77,13 @@ int find_first_set_bit(uint32_t value)
return __builtin_ctz(value);
}
+off_t filesize(int fd)
+{
+ struct stat st;
+ fstat(fd, &st);
+ return st.st_size;
+}
+
/***************** INTERNAL *****************/
static enum { MODE_PLAY, MODE_WRITE } mode;