summaryrefslogtreecommitdiff
path: root/src/shutdown
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-04-28 23:48:26 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-04-28 23:48:26 +0000
commit26f83a95417ff2e5866d6fefab4d737509761622 (patch)
tree004320a4e34db14876925580a77a972a69bd6fde /src/shutdown
parente5512f97985e8ce0798437750fa635dd1c3b02d9 (diff)
downloads6-linux-init-26f83a95417ff2e5866d6fefab4d737509761622.tar.xz
More bugfixes, glibc multilib workaround
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) ;