Skip to content

Commit

Permalink
SoC: dont use new in function param for newlib stub functions
Browse files Browse the repository at this point in the history
This is not workable for c++ compiler

error: expected ',' or '...' before 'new'

Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Nov 4, 2024
1 parent 7160c83 commit 2101f09
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions SoC/evalsoc/Common/Source/Stubs/newlib/stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions SoC/gd32vf103/Common/Source/Stubs/newlib/stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions SoC/gd32vw55x/Common/Source/Stubs/newlib/stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 2101f09

Please sign in to comment.