Skip to content

Commit 7db4163

Browse files
committed
Don't use a Vec in os::current_exe on FreeBSD.
1 parent 843e528 commit 7db4163

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libstd/sys/unix/os.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ pub fn current_exe() -> io::Result<PathBuf> {
187187
unsafe {
188188
use libc::funcs::bsd44::*;
189189
use libc::consts::os::extra::*;
190-
let mut mib = vec![CTL_KERN as c_int,
191-
KERN_PROC as c_int,
192-
KERN_PROC_PATHNAME as c_int,
193-
-1 as c_int];
190+
let mut mib = [CTL_KERN as c_int,
191+
KERN_PROC as c_int,
192+
KERN_PROC_PATHNAME as c_int,
193+
-1 as c_int];
194194
let mut sz: libc::size_t = 0;
195195
let err = sysctl(mib.as_mut_ptr(), mib.len() as ::libc::c_uint,
196196
ptr::null_mut(), &mut sz, ptr::null_mut(),

0 commit comments

Comments
 (0)