derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7785bfa167bd75027bb0a62af39a1010a9471523

commit 7785bfa167bd75027bb0a62af39a1010a9471523
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Tue Oct 18 15:52:56 2016 -0500

    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.
---
 src/lib/ecore/ecore_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index d1b66a6..4a2a829 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -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)

-- 


Reply via email to