ecore: replace arbitrary time with 32-bit safe arbitrary time

The end of time is much closer than you think.  it_value.tv_sec is
a signed 32-bit number on 32-bit machines. Using a negative tv_sec
causes timerfd_settime() to fail.
This commit is contained in:
Derek Foreman 2016-10-18 15:52:56 -05:00
parent 62ca4486ea
commit 7785bfa167
1 changed files with 1 additions and 1 deletions

View File

@ -952,7 +952,7 @@ detect_time_changes_start(void)
if (realtime_fd < 0) return;
memset(&its, 0, sizeof(its));
its.it_value.tv_sec += 0xfffffff0; // end of time - 0xf
its.it_value.tv_sec = 0x7ffffff0; // end of time - 0xf
if (timerfd_settime(realtime_fd,
TFD_TIMER_ABSTIME | TFD_TIMER_CANCELON_SET,
&its, NULL) < 0)