From 1fdbbec13a37ecdb88aece7c007d2b9577c73db8 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 31 Jul 2018 12:08:04 +0300 Subject: [PATCH] syscalls: fix arguments and return type for _raise_r ROM code still uses incorrect function signature. Closes https://github.com/espressif/esp-idf/issues/2245. --- components/esp32/include/rom/libc_stubs.h | 2 +- components/newlib/syscalls.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp32/include/rom/libc_stubs.h b/components/esp32/include/rom/libc_stubs.h index 0c1876e585..90c0b44688 100644 --- a/components/esp32/include/rom/libc_stubs.h +++ b/components/esp32/include/rom/libc_stubs.h @@ -51,7 +51,7 @@ struct syscall_stub_table int (*_rename_r)(struct _reent *r, const char*, const char*); clock_t (*_times_r)(struct _reent *r, struct tms *); int (*_gettimeofday_r) (struct _reent *r, struct timeval *, void *); - void (*_raise_r)(struct _reent *r); + void (*_raise_r)(struct _reent *r); /* function signature is incorrect in ROM */ int (*_unlink_r)(struct _reent *r, const char*); int (*_link_r)(struct _reent *r, const char*, const char*); int (*_stat_r)(struct _reent *r, const char*, struct stat *); diff --git a/components/newlib/syscalls.c b/components/newlib/syscalls.c index d3563e2476..d1c06a472f 100644 --- a/components/newlib/syscalls.c +++ b/components/newlib/syscalls.c @@ -68,7 +68,7 @@ int _system_r(struct _reent *r, const char *str) return -1; } -void _raise_r(struct _reent *r) +int _raise_r(struct _reent *r, int sig) { abort(); }