summaryrefslogtreecommitdiff
path: root/src/shutdown
diff options
context:
space:
mode:
Diffstat (limited to 'src/shutdown')
-rw-r--r--src/shutdown/s6-linux-init-hpr.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shutdown/s6-linux-init-hpr.c b/src/shutdown/s6-linux-init-hpr.c
index c5f7afb..886f10b 100644
--- a/src/shutdown/s6-linux-init-hpr.c
+++ b/src/shutdown/s6-linux-init-hpr.c
@@ -93,8 +93,21 @@ int main (int argc, char const *const *argv)
strerr_warnwu1sys("gethostname") ;
}
else utx.ut_host[UT_HOSTSIZE - 1] = 0 ;
+
+/* glibc multilib can go fuck itself */
+#ifdef __WORDSIZE_TIME64_COMPAT32
+ {
+ struct timeval tv ;
+ if (!timeval_from_tain(&tv, &STAMP))
+ strerr_warnwu1sys("timeval_from_tain") ;
+ utx.ut_tv.tv_sec = tv.tv_sec ;
+ utx.ut_tv.tv_usec = tv.tv_usec ;
+ }
+#else
if (!timeval_from_tain(&utx.ut_tv, &STAMP))
strerr_warnwu1sys("timeval_from_tain") ;
+#endif
+
updwtmpx(_PATH_WTMP, &utx) ;
}
if (dowall) hpr_wall(HPR_WALL_BANNER) ;