diff --git a/compat/mingw.c b/compat/mingw.c
index f899bf08394a9b4b940a311572ab0dc31bdf17de..a0ac487c0c12ea0e7c81485b5784e28f2115a2ea 100644 (file)
--- a/compat/mingw.c
+++ b/compat/mingw.c
initialized = 1;
}
+#undef gethostname
+int mingw_gethostname(char *name, int namelen)
+{
+ ensure_socket_initialization();
+ return gethostname(name, namelen);
+}
+
#undef gethostbyname
struct hostent *mingw_gethostbyname(const char *host)
{