From af2fee302ce491ec98735768be516819876308e2 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 20 May 2011 17:24:05 +0200 Subject: [PATCH] include: Declare gethostname for Windows builds. --- include/winsock.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/winsock.h b/include/winsock.h index 2f5e48032c0..0e409ec873b 100644 --- a/include/winsock.h +++ b/include/winsock.h @@ -1036,7 +1036,6 @@ int WINAPI WS(closesocket)(SOCKET); int WINAPI WS(connect)(SOCKET,const struct WS(sockaddr)*,int); struct WS(hostent)* WINAPI WS(gethostbyaddr)(const char*,int,int); struct WS(hostent)* WINAPI WS(gethostbyname)(const char*); -/* gethostname not defined because of conflicts with unistd.h */ int WINAPI WS(getpeername)(SOCKET,struct WS(sockaddr)*,int*); struct WS(protoent)* WINAPI WS(getprotobyname)(const char*); struct WS(protoent)* WINAPI WS(getprotobynumber)(int); @@ -1059,6 +1058,11 @@ int WINAPI WS(setsockopt)(SOCKET,int,int,const char*,int); int WINAPI WS(shutdown)(SOCKET,int); SOCKET WINAPI WS(socket)(int,int,int); +#if defined(__MINGW32__) || defined (_MSC_VER) +/* gethostname is not defined on Unix because of conflicts with unistd.h */ +int WINAPI WS(gethostname)(char*,int); +#endif + #endif /* !defined(__WINE_WINSOCK2__) || WS_API_PROTOTYPES */ #ifdef __cplusplus