chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ee7c77d
)
manager: fix build on 32bit systems
author
Lennart Poettering
<lennart@poettering.net>
Sun, 25 Nov 2012 18:43:48 +0000
(19:43 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Sun, 25 Nov 2012 18:46:16 +0000
(19:46 +0100)
src/core/manager.c
patch
|
blob
|
history
diff --git
a/src/core/manager.c
b/src/core/manager.c
index 54600c6bfc97f08aed6b0c9b5c22ecf48dc5ec19..1ddd8bae62497407e555bbe4cfa47a03f507754e 100644
(file)
--- a/
src/core/manager.c
+++ b/
src/core/manager.c
@@
-154,7
+154,12
@@
static int manager_setup_time_change(Manager *m) {
}
zero(its);
}
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);
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);