mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
dev-util/measureme: fix compilation
Closes: https://bugs.gentoo.org/974955 Signed-off-by: Daichi Yamamoto <dev@dyama.net>
This commit is contained in:
2 files changed
+29
-1
No files matched your search
@@ -0,0 +1,24 @@
|
||||
From cb2797dd3c81ef5e90a9cd4eded150f561514a52 Mon Sep 17 00:00:00 2001
|
||||
From: Jakob Hellermann <jakob.hellermann@protonmail.com>
|
||||
Date: Thu, 30 Apr 2026 20:49:03 +0200
|
||||
Subject: [PATCH] Remove unnecessary unsafe block
|
||||
|
||||
---
|
||||
measureme/src/counters.rs | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/measureme/src/counters.rs b/measureme/src/counters.rs
|
||||
index 18d5e63..8aedeaa 100644
|
||||
--- a/measureme/src/counters.rs
|
||||
+++ b/measureme/src/counters.rs
|
||||
@@ -689,8 +689,8 @@ mod hw {
|
||||
impl CpuModel {
|
||||
/// Detect the model of the current CPU using `cpuid`.
|
||||
pub(super) fn detect() -> Result<Self, Box<dyn Error + Send + Sync>> {
|
||||
- let cpuid0 = unsafe { std::arch::x86_64::__cpuid(0) };
|
||||
- let cpuid1 = unsafe { std::arch::x86_64::__cpuid(1) };
|
||||
+ let cpuid0 = std::arch::x86_64::__cpuid(0);
|
||||
+ let cpuid1 = std::arch::x86_64::__cpuid(1);
|
||||
let mut vendor = [0; 12];
|
||||
vendor[0..4].copy_from_slice(&cpuid0.ebx.to_le_bytes());
|
||||
vendor[4..8].copy_from_slice(&cpuid0.edx.to_le_bytes());
|
||||
+5
-1
@@ -1,4 +1,4 @@
|
||||
# Copyright 2025 Gentoo Authors
|
||||
# Copyright 2025-2026 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Autogenerated by pycargoebuild 0.15.0
|
||||
@@ -122,6 +122,10 @@ LICENSE+="
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/258.patch"
|
||||
)
|
||||
|
||||
QA_FLAGS_IGNORED=".*"
|
||||
|
||||
src_install() {
|
||||
Reference in new issue
Block a user