summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-01 08:45:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-01 08:45:22 +0000
commitb0f588fe0e3bb79b69eddbcaf4c651489c6e3cc5 (patch)
treed12ef9c8faec615190db497de4f49b277290f93e /ext/socket/extconf.rb
parent05e2da638f2fbb5da018c9585dea066e9de5f979 (diff)
* ext/socket/extconf.rb: get rid of warnings by
-Wmissing-declarations or -Wold-style-definition options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 5ff0f98..330ee39 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -43,9 +43,10 @@ if enable_config("ipv6", default_ipv6)
#include <sys/socket.h>
#endif
int
-main()
+main(void)
{
socket(AF_INET6, SOCK_STREAM, 0);
+ return 0;
}
EOF
$defs << "-DENABLE_IPV6" << "-DINET6"
@@ -263,7 +264,7 @@ getaddr_info_ok = (enable_config("wide-getaddrinfo") && :wide) ||
#endif
int
-main()
+main(void)
{
int passive, gaierr, inet4 = 0, inet6 = 0;
struct addrinfo hints, *ai, *aitop;
@@ -347,12 +348,12 @@ main()
if (aitop)
freeaddrinfo(aitop);
- exit(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
bad:
if (aitop)
freeaddrinfo(aitop);
- exit(EXIT_FAILURE);
+ return EXIT_FAILURE;
}
EOF
if ipv6 and not getaddr_info_ok