From 8413749ec0edb07eede8a936d5473431a1a40966 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Tue, 2 Nov 2021 23:41:01 +0900 Subject: [PATCH] ext/socket/extconf.rb: Fix the chech if if_indextoname is available The check had not work because "headers" were not passed. --- ext/socket/extconf.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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(<