We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 712b698 commit 4060b4eCopy full SHA for 4060b4e
src/lib.rs
@@ -50,13 +50,12 @@ impl FilePath for File {
50
fn path(&self) -> io::Result<PathBuf> {
51
use std::ffi::OsString;
52
use std::os::unix::ffi::OsStringExt;
53
- const F_GETPATH: i32 = 50;
54
55
let fd = self.as_raw_fd();
56
let mut path = vec![0; libc::PATH_MAX as usize + 1];
57
58
unsafe {
59
- if libc::fcntl(fd, F_GETPATH, path.as_mut_ptr()) < 0 {
+ if libc::fcntl(fd, libc::F_GETPATH, path.as_mut_ptr()) < 0 {
60
return Err(io::Error::last_os_error());
61
}
62
0 commit comments