libc/sysconf: Add MONOTONIC_CLOCK for consistency

MIRTOS-107

Add _SC_MONOTONIC_CLOCK to sysconf when CONFIG_CLOCK_MONOTONIC is set

Change-Id: I0ae57798ebe89247a10ccb517e128866d1f907de
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
This commit is contained in:
Peter Bee 2021-01-20 17:57:26 +08:00 committed by Gustavo Henrique Nihei
parent 36db69af96
commit 695935217b

View File

@ -225,6 +225,13 @@ long sysconf(int name)
return 1;
#endif
case _SC_MONOTONIC_CLOCK:
#ifdef CONFIG_CLOCK_MONOTONIC
return 1;
#else
return 0;
#endif
case _SC_PAGESIZE:
#ifdef CONFIG_MM_PGSIZE
return CONFIG_MM_PGSIZE;