Code

Sync with 1.7.9.5
[git.git] / compat / mingw.c
index f899bf08394a9b4b940a311572ab0dc31bdf17de..a0ac487c0c12ea0e7c81485b5784e28f2115a2ea 100644 (file)
@@ -1321,6 +1321,13 @@ static void ensure_socket_initialization(void)
        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)
 {