We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34a9c6b commit f57bba4Copy full SHA for f57bba4
1 file changed
src/emlearn_iir_q15/iir_filter.c
@@ -5,12 +5,13 @@
5
6
#include <string.h>
7
8
-// memset is used by some standard C constructs
9
-#if !defined(__linux__)
10
-__attribute__((weak)) void *memcpy(void *dst, const void *src, size_t n) {
+// memset is used by some standard C constructs. Missing on some platforms, but not all...
+// Unfortunately cannot use weak symbols with mpy_ld
+#if !(defined(__linux__) || defined(__riscv__))
11
+void *memcpy(void *dst, const void *src, size_t n) {
12
return mp_fun_table.memmove_(dst, src, n);
13
}
-__attribute__((weak)) void *memset(void *s, int c, size_t n) {
14
+void *memset(void *s, int c, size_t n) {
15
return mp_fun_table.memset_(s, c, n);
16
17
#endif
0 commit comments