summaryrefslogtreecommitdiff
path: root/tmk_core/common/chibios/syscall-fallbacks.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/common/chibios/syscall-fallbacks.c')
-rw-r--r--tmk_core/common/chibios/syscall-fallbacks.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tmk_core/common/chibios/syscall-fallbacks.c b/tmk_core/common/chibios/syscall-fallbacks.c
index 739017ae1d..4569879c7c 100644
--- a/tmk_core/common/chibios/syscall-fallbacks.c
+++ b/tmk_core/common/chibios/syscall-fallbacks.c
@@ -18,6 +18,12 @@
#include <sys/stat.h>
#include <sys/types.h>
+/* To compile the ChibiOS syscall stubs with picolibc
+ * the _reent struct has to be defined. */
+#if defined(USE_PICOLIBC)
+struct _reent;
+#endif
+
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
__attribute__((weak, used)) int _open_r(struct _reent *r, const char *path, int flag, int m) {