From 9af6528c348feab7c463a0710f6dacc8ac57db95 Mon Sep 17 00:00:00 2001
From: chenjiayi <chenjiayi22@huawei.com>
Date: Wed, 8 Nov 2023 05:17:04 +0800
Subject: [PATCH 048/103] fix(basic): use feature to control procfs compilation
 in get_errno

---
 libs/basic/src/error.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libs/basic/src/error.rs b/libs/basic/src/error.rs
index d138f477..89ac5a3e 100644
--- a/libs/basic/src/error.rs
+++ b/libs/basic/src/error.rs
@@ -88,6 +88,7 @@ impl Error {
                     std::env::VarError::NotUnicode(_) => nix::errno::Errno::EINVAL,
                 }) as i32
             }
+            #[cfg(feature = "process")]
             Error::Proc { source } => match source {
                 procfs::ProcError::Incomplete(_) => nix::errno::Errno::EINVAL as i32,
                 procfs::ProcError::PermissionDenied(_) => nix::errno::Errno::EPERM as i32,
-- 
2.33.0

