* lib/nproc.c: Avoid including deprecated and unneeded header on GLIBC.
glibc deprecated this header since v2.30.
* lib/physmem.c: Likewise.
+2020-02-02 Pádraig Brady <P@draigBrady.com>
+
+ sysctl.h: avoid including on glibc
+ * lib/nproc.c: Avoid including deprecated and unneeded header on GLIBC.
+ * lib/physmem.c: Likewise.
+
2020-02-02 Bruno Haible <bruno@clisp.org>
list, set, oset, map, omap: Avoid imperative voice in documentation.
# include <sys/param.h>
#endif
-#if HAVE_SYS_SYSCTL_H
+#if HAVE_SYS_SYSCTL_H && ! defined __GLIBC__
# include <sys/sysctl.h>
#endif
/* Finally, as fallback, use the APIs that don't distinguish between
NPROC_CURRENT and NPROC_ALL. */
-#if HAVE_SYSCTL && defined HW_NCPU
+#if HAVE_SYSCTL && ! defined __GLIBC__ && defined HW_NCPU
{ /* This works on Mac OS X, FreeBSD, NetBSD, OpenBSD. */
int nprocs;
size_t len = sizeof (nprocs);
# include <sys/param.h>
#endif
-#if HAVE_SYS_SYSCTL_H
+#if HAVE_SYS_SYSCTL_H && ! defined __GLIBC__
# include <sys/sysctl.h>
#endif
}
#endif
-#if HAVE_SYSCTL && defined HW_PHYSMEM
+#if HAVE_SYSCTL && ! defined __GLIBC__ && defined HW_PHYSMEM
{ /* This works on *bsd and darwin. */
unsigned int physmem;
size_t len = sizeof physmem;
}
#endif
-#if HAVE_SYSCTL && defined HW_USERMEM
+#if HAVE_SYSCTL && ! defined __GLIBC__ && defined HW_USERMEM
{ /* This works on *bsd and darwin. */
unsigned int usermem;
size_t len = sizeof usermem;