You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to compile on solaris since 2.8.10 due to ctime_r missing arguments #1837
Due to a change in sentinel.c, redis no longer compiles on Solaris since Redis 2.8.10.
sentinel.c: In function 'sentinelStartFailoverIfNeeded':
sentinel.c:3354:13: error: too few arguments to function 'ctime_r'
/usr/include/time.h:300:14: note: declared here
I believe ctime_r requires 3 arguments on Solaris.
Just adding that other than this, redis has been running perfectly fine without errors or interruptions on Solaris for many months on our systems now. So hopefully this issue can be solved so that we can update from 2.8.9 to a recent build.
Activity
mattsta commentedon Jun 26, 2014
From some documentation: we need to set define
_POSIX_C_SOURCEto get correct functions on Solaris.from http://www.unix.com/man-page/opensolaris/3c/ctime_r/
AndLindemann commentedon Jun 30, 2014
Just adding that other than this, redis has been running perfectly fine without errors or interruptions on Solaris for many months on our systems now. So hopefully this issue can be solved so that we can update from 2.8.9 to a recent build.
antirez commentedon Jun 30, 2014
@AndLindemann please could you try if the following patch works?
AndLindemann commentedon Jun 30, 2014
Applied and compiled successfully.
Server
redis_version:2.8.12
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:fd9346685c48d0b5
redis_mode:standalone
os:SunOS 5.10 sun4u
arch_bits:64
antirez commentedon Jun 30, 2014
Great, committing into all branches.
Fix Solaris compilation due to ctime_r() call.
Fix Solaris compilation due to ctime_r() call.
Fix Solaris compilation due to ctime_r() call.
antirez commentedon Jun 30, 2014
Thanks to @mattsta for providing the solution to the problem. Closed.