changeset 18033:f282834ddccc

readutmp: port to FreeBSD >= 9 * lib/readutmp.h: Map utmpxname() to setutxdb(). With that coreutils who(1) and pinky(1) tests pass.
author Pádraig Brady <P@draigBrady.com>
date Tue, 30 Jun 2015 22:01:06 +0100
parents cbcda721f9b4
children dce9e4637294
files ChangeLog lib/readutmp.h
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-06-30  Pádraig Brady  <P@draigBrady.com>
+
+	readutmp: port to FreeBSD >= 9
+	* lib/readutmp.h: Map utmpxname() to setutxdb().
+	With that coreutils who(1) and pinky(1) tests pass.
+
 2015-06-30  Paul Eggert  <eggert@cs.ucla.edu>
 
 	mgetgroups: port to strict OS X
--- a/lib/readutmp.h
+++ b/lib/readutmp.h
@@ -47,6 +47,8 @@
 #  define END_UTMP_ENT endutxent
 #  ifdef HAVE_UTMPXNAME
 #   define UTMP_NAME_FUNCTION utmpxname
+#  elif defined UTXDB_ACTIVE
+#   define UTMP_NAME_FUNCTION(x) setutxdb (UTXDB_ACTIVE, x)
 #  endif
 
 #  if HAVE_STRUCT_UTMPX_UT_EXIT_E_TERMINATION