hyperic/sigar — pull request #11 by EdSchouten (2011-12-07 23:02:38+00:00)
Title: Make utmp-handling more standards-compliant.

As utmpx is standardized by POSIX, first attempt to access the utmpx
database using the standard getutxent() function. If we don't have
utmpx, fall back to some simple utmp code that accesses the database
manually.

This code has been compile-tested on FreeBSD 8 (utmp), FreeBSD 9 (utmpx)
and Ubuntu Linux 11.10 (utmpx).