From 28d913c58b9a0620b3e76b0de0e4f2a959c6abb3 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Wed, 27 Aug 2025 11:54:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20`xy.os=5Fdevnull`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/xy.h | 5 ++--- src/framework/core.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/xy.h b/lib/xy.h index f7bf3e3..faffad0 100644 --- a/lib/xy.h +++ b/lib/xy.h @@ -64,7 +64,6 @@ bool xy_on_macos = false; bool xy_on_bsd = false; bool xy_on_android = false; -char *xy_os_devnull = NULL; /* 全局变量 与 全局状态 */ struct @@ -1222,9 +1221,9 @@ xy_init () xy_detect_os (); if (xy_on_windows) - xy_os_devnull = "nul"; + xy.os_devnull = "nul"; else - xy_os_devnull = "/dev/null"; + xy.os_devnull = "/dev/null"; xy_use_utf8 (); } diff --git a/src/framework/core.c b/src/framework/core.c index c4f5486..35a024a 100644 --- a/src/framework/core.c +++ b/src/framework/core.c @@ -640,7 +640,7 @@ measure_speed_for_url (void *url) ipv6 = "--ipv6"; } - char *os_devnull = xy_os_devnull; + char *os_devnull = xy.os_devnull; /** * @note 我们用 —L,因为部分链接会跳转到其他地方,比如: RubyChina, npmmirror