Module: wine Branch: master Commit: 0dff81f49501710ad18a33216757e0115ede44c9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0dff81f49501710ad18a332167...
Author: Huw Davies huw@codeweavers.com Date: Tue Oct 15 09:55:49 2013 +0100
wsock32: Add a fallback for inet_network.
---
configure | 1 + configure.ac | 1 + dlls/wsock32/protocol.c | 2 ++ include/config.h.in | 3 +++ 4 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/configure b/configure index 683043c..bfde1af 100755 --- a/configure +++ b/configure @@ -14338,6 +14338,7 @@ for ac_func in \ getprotobyname \ getprotobynumber \ getservbyport \ + inet_addr \ inet_network \ inet_ntop \ inet_pton \ diff --git a/configure.ac b/configure.ac index fc68e1d..a2e1874 100644 --- a/configure.ac +++ b/configure.ac @@ -2130,6 +2130,7 @@ AC_CHECK_FUNCS(\ getprotobyname \ getprotobynumber \ getservbyport \ + inet_addr \ inet_network \ inet_ntop \ inet_pton \ diff --git a/dlls/wsock32/protocol.c b/dlls/wsock32/protocol.c index f398d6a..416613a 100644 --- a/dlls/wsock32/protocol.c +++ b/dlls/wsock32/protocol.c @@ -51,6 +51,8 @@ UINT WINAPI WSOCK32_inet_network(const char *cp) { #ifdef HAVE_INET_NETWORK return inet_network(cp); +#elif defined(HAVE_INET_ADDR) + return ntohl( inet_addr( cp ) ); #else return 0; #endif diff --git a/include/config.h.in b/include/config.h.in index 01e484e..6422b5a 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -264,6 +264,9 @@ /* Define to 1 if you have the `if_nameindex' function. */ #undef HAVE_IF_NAMEINDEX
+/* Define to 1 if you have the `inet_addr' function. */ +#undef HAVE_INET_ADDR + /* Define to 1 if you have the <inet/mib2.h> header file. */ #undef HAVE_INET_MIB2_H