diff options
author | Andy Dougherty <doughera@lafayette.edu> | 2009-04-09 11:41:34 -0400 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2009-04-09 18:06:33 +0200 |
commit | 5a8cf367090fb5d83d8e8e0ae381a3525a215928 (patch) | |
tree | 8b86642745510611ed5aa3ef2182454f137c5ef0 /ext/Socket | |
parent | 0e4fe7cb8f89765c54b6de3fc973c255cd8843a1 (diff) | |
download | perl-5a8cf367090fb5d83d8e8e0ae381a3525a215928.tar.gz |
Fix declaration-after-statement in ext/Socket/Socket.xs
This trivial patch lets C89-ish compilers compile Socket.c again.
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
Diffstat (limited to 'ext/Socket')
-rw-r--r-- | ext/Socket/Socket.xs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs index 064de2ebbf..75d0f33870 100644 --- a/ext/Socket/Socket.xs +++ b/ext/Socket/Socket.xs @@ -477,13 +477,14 @@ inet_pton(af, host) const char * host CODE: #ifdef HAS_INETPTON + int ok; struct in6_addr ip_address; if(af != AF_INET && af != AF_INET6) { croak("Bad address family for %s, got %d, should be either AF_INET or AF_INET6", "Socket::inet_pton", af); } - int ok = (*host != '\0') && inet_pton(af, host, &ip_address); + ok = (*host != '\0') && inet_pton(af, host, &ip_address); ST(0) = sv_newmortal(); if (ok) { |