aboutsummaryrefslogtreecommitdiff
path: root/sysutils/jail_exporter/files/patch-cargo-crates_jail-0.1.1_src_sys.rs
blob: 7ca344440c25ad4540b0215d61e7a31a48580a79 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- cargo-crates/jail-0.1.1/src/sys.rs.orig	2021-04-16 09:14:49 UTC
+++ cargo-crates/jail-0.1.1/src/sys.rs
@@ -113,7 +113,7 @@ pub fn jail_create(
         )
     };
 
-    let err = unsafe { CStr::from_ptr(errmsg.as_ptr() as *mut i8) }
+    let err = unsafe { CStr::from_ptr(errmsg.as_ptr() as *mut libc::c_char) }
         .to_string_lossy()
         .to_string();
 
@@ -171,7 +171,7 @@ pub fn jail_clearpersist(jid: i32) -> Result<(), JailE
         )
     };
 
-    let err = unsafe { CStr::from_ptr(errmsg.as_ptr() as *mut i8) }
+    let err = unsafe { CStr::from_ptr(errmsg.as_ptr() as *mut libc::c_char) }
         .to_string_lossy()
         .to_string();
 
@@ -213,7 +213,7 @@ pub fn jail_getid(name: &str) -> Result<i32, JailError
         )
     };
 
-    let err = unsafe { CStr::from_ptr(errmsg.as_ptr() as *mut i8) }
+    let err = unsafe { CStr::from_ptr(errmsg.as_ptr() as *mut libc::c_char) }
         .to_string_lossy()
         .to_string();
 
@@ -248,7 +248,7 @@ pub fn jail_nextjid(lastjid: i32) -> Result<i32, JailE
         )
     };
 
-    let err = unsafe { CStr::from_ptr(errmsg.as_ptr() as *mut i8) }
+    let err = unsafe { CStr::from_ptr(errmsg.as_ptr() as *mut libc::c_char) }
         .to_string_lossy()
         .to_string();