From 25a0824f18c3a272afc6ebcdeee12168b392ceef Mon Sep 17 00:00:00 2001 From: kib Date: Wed, 19 Apr 2017 10:54:08 +0000 Subject: [PATCH] MFC r316739: Fix reporting of _SC_SEM_NSEMS_MAX and _SC_SEM_VALUE_MAX. --- lib/libc/gen/sysconf.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 71f232105d4..d666c091319 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include /* we just need the limits */ +#include #include #include #include "un-namespace.h" @@ -299,13 +300,9 @@ sysconf(int name) mib[1] = CTL_P1003_1B_RTSIG_MAX; goto yesno; case _SC_SEM_NSEMS_MAX: - mib[0] = CTL_P1003_1B; - mib[1] = CTL_P1003_1B_SEM_NSEMS_MAX; - goto yesno; + return (-1); case _SC_SEM_VALUE_MAX: - mib[0] = CTL_P1003_1B; - mib[1] = CTL_P1003_1B_SEM_VALUE_MAX; - goto yesno; + return (SEM_VALUE_MAX); case _SC_SIGQUEUE_MAX: mib[0] = CTL_P1003_1B; mib[1] = CTL_P1003_1B_SIGQUEUE_MAX; -- 2.45.0