[PATCH:xload] Solaris: use getloadavg from libc instead of kstats

Alan Coopersmith alan.coopersmith at oracle.com
Wed Jan 18 14:37:52 PST 2012


I forgot to mention, this assumes that on BSD's, the autoconf check for
getloadavg will work and can safely replace the older check for
"defined(BSD) && (BSD >= 199306)":

> +# getloadavg: 4.3BSD-Reno&  later, glibc 2.2&  later, Solaris 7&  later
> +# BSD&  GNU libc use<stdlib.h>, Solaris requires<sys/loadavg.h>
> +AC_CHECK_FUNCS([getloadavg], [AC_CHECK_HEADERS([sys/loadavg.h])])

> -#if defined(BSD)&&  (BSD>= 199306)
> +#if defined(HAVE_GETLOADAVG)

There's a lot more ancient cruft that could probably also be purged,
but this was the bit that had a recently uncovered bug that broke us.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list