From 946a823ccbe5038a1bfd78d067443bafed6bf3eb Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 7 Aug 2018 23:26:05 +0300 Subject: [PATCH] syscalls: fix type conversion for _raise_r stub --- components/newlib/syscall_table.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/newlib/syscall_table.c b/components/newlib/syscall_table.c index 624ffcffab..2b3e4ed152 100644 --- a/components/newlib/syscall_table.c +++ b/components/newlib/syscall_table.c @@ -41,6 +41,10 @@ extern int _scanf_float(struct _reent *rptr, FILE *fp, va_list *ap); +static void raise_r_stub(struct _reent *rptr) +{ + _raise_r(rptr, 0); +} static struct syscall_stub_table s_stub_table = { .__getreent = &__getreent, @@ -53,7 +57,7 @@ static struct syscall_stub_table s_stub_table = { ._rename_r = &esp_vfs_rename, ._times_r = &_times_r, ._gettimeofday_r = &_gettimeofday_r, - ._raise_r = (void (*)(struct _reent *r)) &_raise_r, + ._raise_r = &raise_r_stub, ._unlink_r = &esp_vfs_unlink, ._link_r = &esp_vfs_link, ._stat_r = &esp_vfs_stat,