mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 19:25:27 +08:00
6b3a1a2188
* Use VERSION * Update to 0.21.1 * Update win unicode paths patch * Revise uwp patches * Cleanup * Build tools for uwp in CI * tools not supported on uwp * Add license GPL3.0-or-later. gettext.c has: This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. * Fix license, but better. * Version database --------- Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
46 lines
1.5 KiB
Diff
46 lines
1.5 KiB
Diff
diff --git a/gettext-tools/src/hostname.c b/gettext-tools/src/hostname.c
|
|
index e909637..c2e8065 100644
|
|
--- a/gettext-tools/src/hostname.c
|
|
+++ b/gettext-tools/src/hostname.c
|
|
@@ -29,7 +29,9 @@
|
|
#include <locale.h>
|
|
|
|
#if defined _WIN32
|
|
+# if !HAVE_GETHOSTNAME
|
|
# define WIN32_NATIVE
|
|
+# endif
|
|
#endif
|
|
|
|
/* Get gethostname(). */
|
|
@@ -56,6 +58,9 @@
|
|
|
|
/* Support for using gethostbyname(). */
|
|
#if HAVE_GETHOSTBYNAME
|
|
+# if HAVE_WINSOCK2_H
|
|
+# include <winsock2.h>
|
|
+# else
|
|
# include <sys/types.h>
|
|
# include <sys/socket.h> /* defines AF_INET, AF_INET6 */
|
|
# include <netinet/in.h> /* declares ntohs(), defines struct sockaddr_in */
|
|
@@ -76,6 +81,7 @@
|
|
# endif
|
|
# endif
|
|
# include <netdb.h> /* defines struct hostent, declares gethostbyname() */
|
|
+# endif
|
|
#endif
|
|
|
|
/* Include this after <sys/socket.h>, to avoid a syntax error on BeOS. */
|
|
diff --git a/libtextstyle/lib/unistd.in.h b/libtextstyle/lib/unistd.in.h
|
|
index fd69a48..4ebdcaa 100644
|
|
--- a/libtextstyle/lib/unistd.in.h
|
|
+++ b/libtextstyle/lib/unistd.in.h
|
|
@@ -1240,7 +1240,7 @@ _GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
|
|
Null terminate it if the name is shorter than LEN.
|
|
If the host name is longer than LEN, set errno = EINVAL and return -1.
|
|
Return 0 if successful, otherwise set errno and return -1. */
|
|
-# if @UNISTD_H_HAVE_WINSOCK2_H@
|
|
+# if @UNISTD_H_HAVE_WINSOCK2_H@ && !@HAVE_GETHOSTNAME@
|
|
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
|
# undef gethostname
|
|
# define gethostname rpl_gethostname
|