svn commit: r317130 - stable/11/lib/libc/gen

Konstantin Belousov kib at FreeBSD.org
Wed Apr 19 10:54:09 UTC 2017


Author: kib
Date: Wed Apr 19 10:54:08 2017
New Revision: 317130
URL: https://svnweb.freebsd.org/changeset/base/317130

Log:
  MFC r316739:
  Fix reporting of _SC_SEM_NSEMS_MAX and _SC_SEM_VALUE_MAX.

Modified:
  stable/11/lib/libc/gen/sysconf.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libc/gen/sysconf.c
==============================================================================
--- stable/11/lib/libc/gen/sysconf.c	Wed Apr 19 09:07:04 2017	(r317129)
+++ stable/11/lib/libc/gen/sysconf.c	Wed Apr 19 10:54:08 2017	(r317130)
@@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$");
 #include <limits.h>
 #include <paths.h>
 #include <pthread.h>		/* we just need the limits */
+#include <semaphore.h>
 #include <time.h>
 #include <unistd.h>
 #include "un-namespace.h"
@@ -299,13 +300,9 @@ do_NAME_MAX:
 		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;


More information about the svn-src-all mailing list