From 782aef10bbdb63aba6d71e4f5f1876888c70efcb Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 14 Jul 2025 14:48:27 -0700 Subject: [PATCH] merge revision(s) d77e02bd85ab7f841df8d473bac214b9a92a3506: [Backport #21497] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [Bug #21497] [ruby/socket]: add full prototype MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise, gcc 15 will complain: > init.c:573:19: error: too many arguments to function ‘Rconnect’; expected 0, have 3 > 573 | return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len); > | ^~~~~~~~ ~~~~~~~ > In file included from init.c:11: > rubysocket.h:294:5: note: declared here > 294 | int Rconnect(); > | ^~~~~~~~ > sockssocket.c:33:9: error: too many arguments to function ‘SOCKSinit’; expected 0, have 1 > 33 | SOCKSinit("ruby"); > | ^~~~~~~~~ ~~~~~~ > In file included from sockssocket.c:11: > rubysocket.h:293:6: note: declared here > 293 | void SOCKSinit(); > | ^~~~~~~~~ Signed-off-by: Z. Liu --- ext/socket/rubysocket.h | 4 ++-- version.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index 92e0f2604d..b4dcd59bb7 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -292,8 +292,8 @@ extern VALUE rb_eResolution; #ifdef SOCKS extern VALUE rb_cSOCKSSocket; # ifndef SOCKS5 -void SOCKSinit(); -int Rconnect(); +void SOCKSinit(char *); +int Rconnect(int, const struct sockaddr *, socklen_t); # endif #endif diff --git a/version.h b/version.h index df01c745f3..7d1c49c57f 100644 --- a/version.h +++ b/version.h @@ -11,7 +11,7 @@ # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 4 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 49 +#define RUBY_PATCHLEVEL 50 #include "ruby/version.h" #include "ruby/internal/abi.h"