Skip to content

Commit 0e56fc9

Browse files
Merge pull request #13 from LuoZijun/patch-2
Fix PR#11
2 parents 9f176dd + d40a6e9 commit 0e56fc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libproc/kmesg_buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ pub fn kmsgbuf() -> Result<String, String> {
149149
}
150150

151151
pub fn am_root() -> bool {
152-
libc::getuid() == 0
152+
unsafe { libc::getuid() == 0 }
153153
}
154154

155155
// If you want this test to actually test something, then you need to run as root 'sudo cargo test'

0 commit comments

Comments
 (0)