From 2101f09ed124e7491e23e95368a63c9a159d3e18 Mon Sep 17 00:00:00 2001 From: Huaqi Fang <578567190@qq.com> Date: Mon, 4 Nov 2024 18:42:15 +0800 Subject: [PATCH] SoC: dont use new in function param for newlib stub functions This is not workable for c++ compiler error: expected ',' or '...' before 'new' Signed-off-by: Huaqi Fang <578567190@qq.com> --- SoC/evalsoc/Common/Source/Stubs/newlib/stubs.c | 4 ++-- SoC/gd32vf103/Common/Source/Stubs/newlib/stubs.c | 4 ++-- SoC/gd32vw55x/Common/Source/Stubs/newlib/stubs.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/SoC/evalsoc/Common/Source/Stubs/newlib/stubs.c b/SoC/evalsoc/Common/Source/Stubs/newlib/stubs.c index 9d643ba8..07031c60 100644 --- a/SoC/evalsoc/Common/Source/Stubs/newlib/stubs.c +++ b/SoC/evalsoc/Common/Source/Stubs/newlib/stubs.c @@ -153,7 +153,7 @@ __WEAK int _lseek(int file, int offset, int whence) return 0; } -__WEAK int _link(char* old, char* new) +__WEAK int _link(char* path1, char* path2) { errno = EMLINK; return -1; @@ -170,7 +170,7 @@ __WEAK int _close(int fd) return -1; } -__WEAK int _unlink(const char* name) +__WEAK int _unlink(const char* path) { return -1; } diff --git a/SoC/gd32vf103/Common/Source/Stubs/newlib/stubs.c b/SoC/gd32vf103/Common/Source/Stubs/newlib/stubs.c index d6ce270a..7513f3c6 100644 --- a/SoC/gd32vf103/Common/Source/Stubs/newlib/stubs.c +++ b/SoC/gd32vf103/Common/Source/Stubs/newlib/stubs.c @@ -153,7 +153,7 @@ __WEAK int _lseek(int file, int offset, int whence) return 0; } -__WEAK int _link(char* old, char* new) +__WEAK int _link(char* path1, char* path2) { errno = EMLINK; return -1; @@ -170,7 +170,7 @@ __WEAK int _close(int fd) return -1; } -__WEAK int _unlink(const char* name) +__WEAK int _unlink(const char* path) { return -1; } diff --git a/SoC/gd32vw55x/Common/Source/Stubs/newlib/stubs.c b/SoC/gd32vw55x/Common/Source/Stubs/newlib/stubs.c index 9cc65159..a02ac646 100644 --- a/SoC/gd32vw55x/Common/Source/Stubs/newlib/stubs.c +++ b/SoC/gd32vw55x/Common/Source/Stubs/newlib/stubs.c @@ -158,7 +158,7 @@ __WEAK int _lseek(int file, int offset, int whence) return 0; } -__WEAK int _link(char* old, char* new) +__WEAK int _link(char* path1, char* path2) { errno = EMLINK; return -1; @@ -175,7 +175,7 @@ __WEAK int _close(int fd) return -1; } -__WEAK int _unlink(const char* name) +__WEAK int _unlink(const char* path) { return -1; }