From 547931c4e4ebcfebf3cc18adfbb72b2e4555d6f9 Mon Sep 17 00:00:00 2001 From: Mikachu2333 Date: Mon, 6 Oct 2025 01:57:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20xy=5Fdetect=5Fos=20?= =?UTF-8?q?=E5=86=85=E5=AD=98=E6=B3=84=E9=9C=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/xy.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/xy.h b/lib/xy.h index 52fc421..1a916a6 100644 --- a/lib/xy.h +++ b/lib/xy.h @@ -1351,9 +1351,10 @@ xy_detect_os () fp = popen ("uname -s", "r"); if (!fp) { - if (opendir ("/etc/rc.d")) + DIR *bsd_dir = opendir ("/etc/rc.d"); + if (bsd_dir) { - closedir (d); + closedir (bsd_dir); xy.on_bsd = true; return; }