From 2bf434214ec73445d941dbcb60bcfd27a075d141 Mon Sep 17 00:00:00 2001 From: fangxinyong Date: Sat, 24 Jun 2023 19:40:00 +0800 Subject: [PATCH] libc/sysconf: add _SC_REALTIME_SIGNALS pass ltp case: open_posix_testsuite/conformance/interfaces/sigwait/7-1.c Signed-off-by: fangxinyong --- include/unistd.h | 2 +- libs/libc/unistd/lib_sysconf.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/unistd.h b/include/unistd.h index 4b2666a10e7..4b2b89f6ec1 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -45,7 +45,6 @@ #define POSIX_VERSION #undef _POSIX_SAVED_IDS #undef _POSIX_JOB_CONTROL -#define _POSIX_REALTIME_SIGNALS 1 #define _POSIX_MESSAGE_PASSING 1 #undef _POSIX_MAPPED_FILES #undef _POSIX_SHARED_MEMORY_OBJECTS @@ -65,6 +64,7 @@ #define _POSIX_PRIORITIZED_IO _POSIX_VERSION #define _POSIX_CPUTIME _POSIX_VERSION #define _POSIX_THREAD_CPUTIME _POSIX_VERSION +#define _POSIX_REALTIME_SIGNALS _POSIX_VERSION #define _POSIX_THREAD_PRIORITY_SCHEDULING _POSIX_VERSION #ifdef CONFIG_FS_AIO diff --git a/libs/libc/unistd/lib_sysconf.c b/libs/libc/unistd/lib_sysconf.c index f0fde4bfe21..eff4e718e2d 100644 --- a/libs/libc/unistd/lib_sysconf.c +++ b/libs/libc/unistd/lib_sysconf.c @@ -227,6 +227,8 @@ long sysconf(int name) return _POSIX_CPUTIME; case _SC_THREAD_CPUTIME: return _POSIX_THREAD_CPUTIME; + case _SC_REALTIME_SIGNALS: + return _POSIX_REALTIME_SIGNALS; case _SC_CLK_TCK: return CLOCKS_PER_SEC;