Skip to content

Commit

Permalink
Merge pull request wesleywiser#13 from pkubaj/patch-1
Browse files Browse the repository at this point in the history
Fix build on FreeBSD on ARM or POWER
  • Loading branch information
wesleywiser authored Sep 19, 2022
2 parents 8eb4c2a + f700f8a commit 3335e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bsd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub fn get_executable_path() -> Option<PathBuf> {
// FreeBSD without procfs
if result == 0 {
// Convert the string allocated on the stack to a Rust string.
let len = unsafe { strlen(buf.as_ptr() as *const i8) };
let len = unsafe { strlen(buf.as_ptr() as *const libc::c_char) };
unsafe { buf.set_len(len) };
match String::from_utf8(buf).ok() {
Some(path) => {
Expand Down

0 comments on commit 3335e38

Please sign in to comment.