From 26f83a95417ff2e5866d6fefab4d737509761622 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sun, 28 Apr 2019 23:48:26 +0000 Subject: More bugfixes, glibc multilib workaround --- src/shutdown/s6-linux-init-hpr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/shutdown') 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) ; -- cgit v1.2.3