Skip to content

Commit 8017e17

Browse files
committed
libc: newlib + picolibc: indicate sigevent and sigval are declared
Indicate that C library headers have declared `struct sigevent` and `struct sigval` to avoid redefinition warnings / errors. Signed-off-by: Chris Friedt <[email protected]>
1 parent e3ba8bc commit 8017e17

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/libc/newlib/include/signal.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
#undef sigdelset
3535
#undef sigismember
3636

37+
#if defined(_POSIX_REALTIME_SIGNALS)
38+
#define _SIGEVENT_DECLARED
39+
#define _SIGVAL_DECLARED
40+
#endif
41+
3742
#endif /* defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__) */
3843

3944
#endif /* ZEPHYR_LIB_LIBC_NEWLIB_INCLUDE_SIGNAL_H_ */

lib/libc/picolibc/include/signal.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ int pthread_sigmask(int how, const sigset_t *ZRESTRICT set, sigset_t *ZRESTRICT
4747
#undef sigdelset
4848
#undef sigismember
4949

50+
#if defined(_POSIX_REALTIME_SIGNALS)
51+
#define _SIGEVENT_DECLARED
52+
#define _SIGVAL_DECLARED
53+
#endif
54+
5055
#endif /* defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__) */
5156

5257
#endif /* ZEPHYR_LIB_LIBC_PICOLIBC_INCLUDE_SIGNAL_H_ */

0 commit comments

Comments
 (0)