summaryrefslogtreecommitdiff
path: root/sessreg.c
diff options
context:
space:
mode:
Diffstat (limited to 'sessreg.c')
-rw-r--r--sessreg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sessreg.c b/sessreg.c
index 1c13ece..a86724b 100644
--- a/sessreg.c
+++ b/sessreg.c
@@ -217,11 +217,19 @@ main (int argc, char **argv)
wtmp_file = getstring (&argv, &wflag);
if (!strcmp (wtmp_file, "none"))
wtmp_none = 1;
+#if defined(USE_UTMPX) && defined(HAVE_UPDWTMPX)
+ else
+ wtmpx_file = wtmp_file;
+#endif
break;
case 'u':
utmp_file = getstring (&argv, &uflag);
if (!strcmp (utmp_file, "none"))
utmp_none = 1;
+#if defined(USE_UTMPX) && defined(HAVE_UTMPXNAME)
+ else
+ utmpx_file = utmp_file;
+#endif
break;
#ifdef USE_LASTLOG
case 'L':