diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index c86cc8f8c0..b70a862414 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -484,6 +484,9 @@ EOF have_func("getpeerucred(0, (ucred_t **)NULL)", headers) # SunOS have_func_decl = proc do |name, headers| + # check if there is a declaration of by trying to declare + # both "int (void)" and "void (void)" + # (at least one attempt should fail if there is a declaration) if !checking_for("declaration of #{name}()") {!%w[int void].all? {|ret| try_compile(<