From 4bc2d7629207579c0f0979a84a5c99fe933111d6 Mon Sep 17 00:00:00 2001 From: fufesou Date: Thu, 14 May 2026 15:14:13 +0800 Subject: [PATCH] refact(ipc): trivial changes Signed-off-by: fufesou --- src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.rs b/src/config.rs index 144ee224b..4be1cb49a 100644 --- a/src/config.rs +++ b/src/config.rs @@ -175,7 +175,7 @@ pub fn is_service_ipc_postfix(postfix: &str) -> bool { } // Keep Linux/macOS IPC parent directory rules in one place to avoid drift between -// `ipc_path()` and Linux-only `ipc_path_for_uid()`. +// `ipc_path()` and Unix `ipc_path_for_uid()`. #[cfg(any(target_os = "linux", target_os = "macos"))] #[inline] fn ipc_parent_dir_for_uid(uid: u32, postfix: &str) -> String { @@ -871,7 +871,7 @@ impl Config { } } - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "macos"))] pub fn ipc_path_for_uid(uid: u32, postfix: &str) -> String { let parent = ipc_parent_dir_for_uid(uid, postfix); format!("{parent}/ipc{postfix}") @@ -3523,7 +3523,7 @@ mod tests { } #[test] - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "macos"))] fn test_uinput_ipc_path_is_shared_across_uids() { const ROOT_UID: u32 = 0; const USER_UID: u32 = 1000;