summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ. Liu <[email protected]>2025-07-02 09:09:52 +0800
committerGitHub <[email protected]>2025-07-02 01:09:52 +0000
commitd77e02bd85ab7f841df8d473bac214b9a92a3506 (patch)
tree28a7d8966edf8f8c68a9461b2d2439010f146e7e
parent2cb065d0a267fbd89f6b42447159146cb8694ade (diff)
[Bug #21497] [ruby/socket]: add full prototype
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 <[email protected]>
-rw-r--r--ext/socket/rubysocket.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 54a5381da4..dcafbe24e3 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