Alexandre Julliard : include: Declare gethostname for Windows builds.

Alexandre Julliard julliard at winehq.org
Fri May 20 12:44:33 CDT 2011


Module: wine
Branch: master
Commit: af2fee302ce491ec98735768be516819876308e2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=af2fee302ce491ec98735768be516819876308e2

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri May 20 17:24:05 2011 +0200

include: Declare gethostname for Windows builds.

---

 include/winsock.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/include/winsock.h b/include/winsock.h
index 2f5e480..0e409ec 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




More information about the wine-cvs mailing list