diff options
| author | wangxiaoyao <[email protected]> | 2023-02-20 13:45:07 +0800 |
|---|---|---|
| committer | guo <[email protected]> | 2023-02-21 08:48:49 +0800 |
| commit | f84d89b0ca9c8982d436aa12be75554722462090 (patch) | |
| tree | 9e61cdc92ea08f01a4679efba8184a9fe3cc3a9c /components/libc | |
| parent | 855aef9c9c59df12102d6ddfe43ef02c05171036 (diff) | |
[libc] including musl signal.h with _POSIX_SOURCE
Diffstat (limited to 'components/libc')
| -rw-r--r-- | components/libc/compilers/common/include/sys/signal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/components/libc/compilers/common/include/sys/signal.h b/components/libc/compilers/common/include/sys/signal.h index 6e06c8ba14..8e67ae9ae1 100644 --- a/components/libc/compilers/common/include/sys/signal.h +++ b/components/libc/compilers/common/include/sys/signal.h @@ -17,7 +17,17 @@ extern "C" { #endif /* __cplusplus */ #ifdef RT_USING_MUSLLIBC +/* this is require for musl <signal.h> */ +#ifndef _POSIX_SOURCE +#define _POSIX_SOURCE #include <signal.h> +/* limit influenced of _POSIX_SOURCE */ +#undef _POSIX_SOURCE + +#else /* ndef _POSIX_SOURCE */ +#include <signal.h> +#endif + #else #include <stdint.h> |
