X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fmanager.c;h=d4afc931f3d7270e3fa43650312e7b2e10b8f234;hp=3a4023f31a914f40adfa25f6cec6cefafb5b2506;hb=d6a195a3c373f67632cb98d6e6e14f974ef062f9;hpb=66870f90dec9b5bf4ad76f9757fafce703560a67 diff --git a/src/core/manager.c b/src/core/manager.c index 3a4023f31..d4afc931f 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -157,8 +157,8 @@ static int manager_setup_time_change(Manager *m) { /* 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; + assert_cc(sizeof(time_t) == sizeof(TIME_T_MAX)); + its.it_value.tv_sec = TIME_T_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"); @@ -301,6 +301,7 @@ int manager_new(SystemdRunningAs running_as, Manager **_m) { return -ENOMEM; dual_timestamp_get(&m->userspace_timestamp); + dual_timestamp_from_monotonic(&m->kernel_timestamp, 0); m->running_as = running_as; m->name_data_slot = m->conn_data_slot = m->subscribed_data_slot = -1;