Skip to content

Commit f6dbbf4

Browse files
committed
SoC: only define _DEFAULT_SOURCE when _DEFAULT_SOURCE not defined in newlib stubs.c
Signed-off-by: Huaqi Fang <[email protected]>
1 parent c7fe9a7 commit f6dbbf4

File tree

3 files changed

+6
-0
lines changed
  • SoC
    • evalsoc/Common/Source/Stubs/newlib
    • gd32vf103/Common/Source/Stubs/newlib
    • gd32vw55x/Common/Source/Stubs/newlib

3 files changed

+6
-0
lines changed

SoC/evalsoc/Common/Source/Stubs/newlib/stubs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/* See LICENSE of license details. */
22
// If you want to enable GNU extensions, please define _GNU_SOURCE
33
// Enable POSIX-1.2008 with BSD and SVr4 extensions via _DEFAULT_SOURCE
4+
#ifndef _DEFAULT_SOURCE
45
#define _DEFAULT_SOURCE
6+
#endif
57
#include <stdint.h>
68
#include <errno.h>
79
#include <unistd.h>

SoC/gd32vf103/Common/Source/Stubs/newlib/stubs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/* See LICENSE of license details. */
22
// If you want to enable GNU extensions, please define _GNU_SOURCE
33
// Enable POSIX-1.2008 with BSD and SVr4 extensions via _DEFAULT_SOURCE
4+
#ifndef _DEFAULT_SOURCE
45
#define _DEFAULT_SOURCE
6+
#endif
57
#include <stdint.h>
68
#include <errno.h>
79
#include <unistd.h>

SoC/gd32vw55x/Common/Source/Stubs/newlib/stubs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/* See LICENSE of license details. */
22
// If you want to enable GNU extensions, please define _GNU_SOURCE
33
// Enable POSIX-1.2008 with BSD and SVr4 extensions via _DEFAULT_SOURCE
4+
#ifndef _DEFAULT_SOURCE
45
#define _DEFAULT_SOURCE
6+
#endif
57
#include <stdint.h>
68
#include <errno.h>
79
#include <unistd.h>

0 commit comments

Comments
 (0)