代码拉取完成,页面将自动刷新
From 4efb5455073c23a6a90845eb541910eba6dc76f3 Mon Sep 17 00:00:00 2001
From: renoseven <dev@renoseven.net>
Date: Fri, 6 Sep 2024 22:14:11 +0800
Subject: [PATCH] upatch-helper: fix object upatch id duplicated issue
Signed-off-by: renoseven <dev@renoseven.net>
---
upatch-helper/Cargo.toml | 2 +-
upatch-helper/src/main.rs | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/upatch-helper/Cargo.toml b/upatch-helper/Cargo.toml
index 42f3548..b131b66 100644
--- a/upatch-helper/Cargo.toml
+++ b/upatch-helper/Cargo.toml
@@ -9,5 +9,5 @@ rust-version = "1.60"
build = "build.rs"
[dependencies]
-syscare-common = { package = "syscare-common", path = "../syscare-common" }
anyhow = { version = "1.0" }
+uuid = { version = "0.8", features = ["v4"] }
diff --git a/upatch-helper/src/main.rs b/upatch-helper/src/main.rs
index d98b167..303088c 100644
--- a/upatch-helper/src/main.rs
+++ b/upatch-helper/src/main.rs
@@ -15,7 +15,7 @@
use std::{os::unix::process::CommandExt, path::Path, process::Command};
use anyhow::{bail, Context};
-use syscare_common::os;
+use uuid::Uuid;
const UPATCH_CC_ENV: &str = "UPATCH_HELPER_CC";
const UPATCH_CXX_ENV: &str = "UPATCH_HELPER_CXX";
@@ -50,9 +50,9 @@ fn main() -> anyhow::Result<()> {
if exec_args.iter().any(|arg| arg == OUTPUT_FLAG) {
command.args(APPEND_ARGS);
command.arg(format!(
- "-Wa,--defsym,{}0x{:04x}=0",
+ "-Wa,--defsym,{}{}=0",
UPATCH_ID_PREFIX,
- os::process::id()
+ Uuid::new_v4(),
));
}
--
2.34.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。