Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.6RC3, JRuby 1.6
-
Component/s: C Extensions
-
Labels:None
-
Number of attachments :
Description
The prototype for rb_time_new doesn't match the definition. The prototype is:
RUBY_DLLSPEC VALUE rb_time_new(long sec, long usec);
https://github.com/jruby/jruby/blob/master/cext/src/include/ruby/ruby.h#L1003
the definition is:
extern "C" VALUE
rb_time_new(time_t sec, long usec)
https://github.com/jruby/jruby/blob/master/cext/src/time.cpp#L23
On OpenBSD i386, the compiler errors out because time_t is int and and not long. Changing the prototype to time_t fixes the issue. Patch attached.
Jeremy,
Can you provide a git patch, so that we can give you credit?
Thanks.