diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-14 14:24:42 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-14 14:24:42 +0000 |
commit | 5ec5c6d52c69517d97cddd5daeb0b5c9af80ff81 (patch) | |
tree | 55bceed1296f72beaaa023ce046e4c08d5cc44c0 /ext/socket/rubysocket.h | |
parent | b6decf289fb90e579733ed29571f0870c7a7c169 (diff) | |
download | ruby-5ec5c6d52c69517d97cddd5daeb0b5c9af80ff81.tar.gz |
socket: fix build error and warnings on mingw
* ext/socket/extconf.rb: check for if_nametoindex() for
i686-w64-mingw32, and check for declarations of if_indextoname() and
if_nametoindex().
* ext/socket/ifaddr.c (ifaddr_ifindex): not-implement unless
if_nametoindex() is available.
* ext/socket/rubysocket.h: declare if_indextoname() and
if_nametoindex() if available but not declared.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r-- | ext/socket/rubysocket.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index 7b1d43afac..97c02fc410 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -106,6 +106,13 @@ typedef int socklen_t; #endif +#ifdef NEED_IF_INDEXTONAME_DECL +char *if_indextoname(unsigned int, char *); +#endif +#ifdef NEED_IF_NAMETOINDEX_DECL +unsigned int if_nametoindex(const char *); +#endif + #define SOCKLEN_MAX \ (0 < (socklen_t)-1 ? \ ~(socklen_t)0 : \ |