1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 09:21:26 +03:00

manager: fix build on 32bit systems

This commit is contained in:
Lennart Poettering 2012-11-25 19:43:48 +01:00
parent ee7c77db55
commit 8a3a1704c7

View File

@ -154,7 +154,12 @@ static int manager_setup_time_change(Manager *m) {
}
zero(its);
its.it_value.tv_sec = 10000000000; /* Year 2287 or so... */
/* We only care for the cancellation event, hence we set the
* timeout to the latest possible value. */
assert_cc(sizeof(time_t) == sizeof(long));
its.it_value.tv_sec = LONG_MAX;
if (timerfd_settime(m->time_change_watch.fd, TFD_TIMER_ABSTIME|TFD_TIMER_CANCEL_ON_SET, &its, NULL) < 0) {
log_debug("Failed to set up TFD_TIMER_CANCEL_ON_SET, ignoring: %m");
close_nointr_nofail(m->time_change_watch.fd);