File: libuv-1.42-py27-win.patch

package info (click to toggle)
python-gevent 22.10.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 23,476 kB
  • sloc: python: 194,036; ansic: 75,126; sh: 7,061; makefile: 1,557; javascript: 108; awk: 18
file content (27 lines) | stat: -rw-r--r-- 721 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
diff --git a/deps/libuv/src/win/util.c b/deps/libuv/src/win/util.c
index 88602c7e..d6009ce3 100644
--- a/deps/libuv/src/win/util.c
+++ b/deps/libuv/src/win/util.c
@@ -1662,7 +1662,13 @@ int uv_os_unsetenv(const char* name) {
   return 0;
 }
 
-
+/**
+ * gevent: disable this function for Python 2.7 on Windows.
+ *
+ * It fails to link on anything older than Windows 8/Windows Server 2012
+ * because of GetHostNameW.
+ */
+#if 0
 int uv_os_gethostname(char* buffer, size_t* size) {
   WCHAR buf[UV_MAXHOSTNAMESIZE];
   size_t len;
@@ -1694,6 +1700,7 @@ int uv_os_gethostname(char* buffer, size_t* size) {
   *size = len;
   return 0;
 }
+#endif
 
 
 static int uv__get_handle(uv_pid_t pid, int access, HANDLE* handle) {