Skip to content

win 3.1 CI failure: error: passing argument 3 of 'rb_define_private_method' from incompatible pointer type [-Wincompatible-pointer-types] #92

@olleolleolle

Description

@olleolleolle

This issue is about the Windows extension, which had this failure, in a build in #91 - here's the output

Details

win32 ../../../../ext/win32/resolv/extconf.rb
checking for GetNetworkParams() in -liphlpapi... yes
creating Makefile
make.exe
generating resolv-x64-mingw-ucrt.def
compiling ../../../../ext/win32/resolv/resolv.c
../../../../ext/win32/resolv/resolv.c: In function 'InitVM_resolv':
../../../../ext/win32/resolv/resolv.c:60:60: error: passing argument 3 of 'rb_define_private_method' from incompatible pointer type [-Wincompatible-pointer-types]
60 | rb_define_private_method(singl, "get_dns_server_list", get_dns_server_list, 0);
| ^~~~~~~~~~~~~~~~~~~
| |
| VALUE ()(VALUE) {aka long long unsigned int ()(long long unsigned int)}
In file included from C:/hostedtoolcache/windows/Ruby/3.1.7/x64/include/ruby-3.1.0/ruby/internal/anyargs.h:76,
from C:/hostedtoolcache/windows/Ruby/3.1.7/x64/include/ruby-3.1.0/ruby/ruby.h:26,
from C:/hostedtoolcache/windows/Ruby/3.1.7/x64/include/ruby-3.1.0/ruby.h:38,
from ../../../../ext/win32/resolv/resolv.c:1:
C:/hostedtoolcache/windows/Ruby/3.1.7/x64/include/ruby-3.1.0/ruby/internal/intern/class.h:340:69: note: expected 'VALUE ()(void)' {aka 'long long unsigned int ()(void)'} but argument is of type 'VALUE ()(VALUE)' {aka 'long long unsigned int ()(long long unsigned int)'}
340 | void rb_define_private_method(VALUE klass, const char *mid, VALUE (*func)(ANYARGS), int arity);
| ~~~~~~~~^~~~~~~~~~~~~~
../../../../ext/win32/resolv/resolv.c:25:1: note: 'get_dns_server_list' declared here
25 | get_dns_server_list(VALUE self)
| ^~~~~~~~~~~~~~~~~~~
make: *** [Makefile:254: resolv.o] Error 1
rake aborted!
Command failed with status (2): [make.exe]
D:/a/resolv/resolv/vendor/bundle/ruby/3.1.0/bundler/gems/ruby-core-tasks-81412ef540dc/lib/ruby-core/make.rb:20:in []' D:/a/resolv/resolv/vendor/bundle/ruby/3.1.0/bundler/gems/ruby-core-tasks-81412ef540dc/lib/ruby-core/extensiontask.rb:54:in block in define_extconf_task'
D:/a/resolv/resolv/vendor/bundle/ruby/3.1.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => test => compile => .build/3.1.7/x64-mingw-ucrt/win32/win32/resolv.so
(See full trace by running task with --trace)
mkdir -p .build/3.1.7/x64-mingw-ucrt/win32
Error: Process completed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions