[libc] including musl signal.h with _POSIX_SOURCE

This commit is contained in:
wangxiaoyao 2023-02-20 13:45:07 +08:00 committed by guo
parent 855aef9c9c
commit f84d89b0ca
1 changed files with 10 additions and 0 deletions

View File

@ -17,7 +17,17 @@ extern "C" {
#endif /* __cplusplus */ #endif /* __cplusplus */
#ifdef RT_USING_MUSLLIBC #ifdef RT_USING_MUSLLIBC
/* this is require for musl <signal.h> */
#ifndef _POSIX_SOURCE
#define _POSIX_SOURCE
#include <signal.h> #include <signal.h>
/* limit influenced of _POSIX_SOURCE */
#undef _POSIX_SOURCE
#else /* ndef _POSIX_SOURCE */
#include <signal.h>
#endif
#else #else
#include <stdint.h> #include <stdint.h>