Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 2017 10:57:57 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r317131 - stable/10/lib/libc/gen
Message-ID:  <201704191057.v3JAvvpY040084@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Apr 19 10:57:57 2017
New Revision: 317131
URL: https://svnweb.freebsd.org/changeset/base/317131

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

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

Modified: stable/10/lib/libc/gen/sysconf.c
==============================================================================
--- stable/10/lib/libc/gen/sysconf.c	Wed Apr 19 10:54:08 2017	(r317130)
+++ stable/10/lib/libc/gen/sysconf.c	Wed Apr 19 10:57:57 2017	(r317131)
@@ -47,6 +47,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>
 
@@ -298,13 +299,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704191057.v3JAvvpY040084>