diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-11-25 19:43:48 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-11-25 19:46:16 +0100 |
commit | 8a3a1704c7738a49385e1e1a2a5041f50e79f57e (patch) | |
tree | e96b6b283d6cd2764883b2dc2f50417dda36c542 | |
parent | ee7c77db55cb105e69f1a088539da602c706c611 (diff) |
manager: fix build on 32bit systems
-rw-r--r-- | src/core/manager.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 54600c6bfc..1ddd8bae62 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -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); |