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
Ruby declares gettimeofday() on Windows, but the function is also declared in mingw-w64's sys/time.h. Both definitions are incompatible and extension builds fail, if both ruby.h and sys/time.h are included. This is the related error message from rake gem:native of the grpc gem:
compiling ../../../../src/ruby/ext/grpc/rb_byte_buffer.cInfileincludedfrom ../../../../src/ruby/ext/grpc/rb_grpc.h:23:0,
from ../../../../src/ruby/ext/grpc/rb_byte_buffer.c:27:
/usr/share/mingw-w64/include/sys/time.h:42:13: error: conflictingtypesfor 'gettimeofday'
int __cdecl gettimeofday(structtimeval*__restrict__,
^~~~~~~~~~~~
Infileincludedfrom /usr/local/rake-compiler/ruby/i686-w64-mingw32/ruby-2.7.0/include/ruby-2.7.0/ruby/defines.h:371:0,
from /usr/local/rake-compiler/ruby/i686-w64-mingw32/ruby-2.7.0/include/ruby-2.7.0/ruby/ruby.h:29,
from ../../../../src/ruby/ext/grpc/rb_byte_buffer.c:19:
/usr/local/rake-compiler/ruby/i686-w64-mingw32/ruby-2.7.0/include/ruby-2.7.0/ruby/win32.h:318:12: note: previousdeclarationof'gettimeofday'washereexternintgettimeofday(structtimeval*, structtimezone*);
^~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
Ruby declares
gettimeofday()
on Windows, but the function is also declared in mingw-w64'ssys/time.h
. Both definitions are incompatible and extension builds fail, if bothruby.h
andsys/time.h
are included. This is the related error message fromrake gem:native
of the grpc gem:The text was updated successfully, but these errors were encountered: