From 7107d08e92f84fe4a5c1a9f96d297dfe0fe6bd0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 3 Jun 2025 21:44:06 +0800 Subject: [PATCH] DE (DragonFly): fix build --- src/detection/de/de_linux.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/detection/de/de_linux.c b/src/detection/de/de_linux.c index 7237c53c0..2f3570e19 100644 --- a/src/detection/de/de_linux.c +++ b/src/detection/de/de_linux.c @@ -12,11 +12,18 @@ #include #ifdef __FreeBSD__ #include + #ifndef _PATH_LOCALBASE + #define _PATH_LOCALBASE "/usr/local" + #endif +#elif __OpenBSD__ + #define _PATH_LOCALBASE "/usr/local" +#elif __NetBSD__ + #define _PATH_LOCALBASE "/usr/pkg" #endif static void getKDE(FFstrbuf* result, FFDEOptions* options) { -#ifdef __FreeBSD__ +#ifdef _PATH_LOCALBASE ffParsePropFile(_PATH_LOCALBASE "/share/wayland-sessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result); if(result->length == 0) ffParsePropFile(_PATH_LOCALBASE "/share/xsessions/plasmax11.desktop", "X-KDE-PluginInfo-Version =", result);