mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
fix: 修复跨平台编译错误 - 添加 macOS 存根方法
- 添加 set_macos_machine_id 的非 macOS 平台存根实现 - 添加 check_macos_admin 的非 macOS 平台存根实现 - 修复 E0599 编译错误:方法未找到 - 所有平台现在都能正确编译 - 遵循现有的条件编译模式
This commit is contained in:
@@ -491,6 +491,29 @@ impl MachineIdService {
|
||||
})
|
||||
}
|
||||
|
||||
// === macOS 存根实现 (非 macOS 平台) ===
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
async fn set_macos_machine_id(&self, _new_id: &str) -> Result<MachineIdResult, String> {
|
||||
Ok(MachineIdResult {
|
||||
success: false,
|
||||
message: "macOS machine ID modification not supported on this platform".to_string(),
|
||||
requires_restart: false,
|
||||
requires_admin: false,
|
||||
new_machine_id: None,
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
async fn check_macos_admin(&self) -> Result<AdminStatus, String> {
|
||||
Ok(AdminStatus {
|
||||
is_admin: false,
|
||||
platform: "non-macOS".to_string(),
|
||||
elevation_method: None,
|
||||
check_success: false,
|
||||
})
|
||||
}
|
||||
|
||||
// === Linux 特定实现 ===
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
|
||||
Reference in New Issue
Block a user