##// END OF EJS Templates
rust-hg-core: use correct type for libc hostname buffer...
Luke Granger-Brown -
r49817:8e828c0f default draft
parent child Browse files
Show More
@@ -145,7 +145,7 b' lazy_static::lazy_static! {'
145
145
146 /// Same as https://github.com/python/cpython/blob/v3.10.0/Modules/socketmodule.c#L5414
146 /// Same as https://github.com/python/cpython/blob/v3.10.0/Modules/socketmodule.c#L5414
147 const BUFFER_SIZE: usize = 1024;
147 const BUFFER_SIZE: usize = 1024;
148 let mut buffer = [0_i8; BUFFER_SIZE];
148 let mut buffer = [0 as libc::c_char; BUFFER_SIZE];
149 let hostname_bytes = unsafe {
149 let hostname_bytes = unsafe {
150 let result = libc::gethostname(buffer.as_mut_ptr(), BUFFER_SIZE);
150 let result = libc::gethostname(buffer.as_mut_ptr(), BUFFER_SIZE);
151 if result != 0 {
151 if result != 0 {
General Comments 0
You need to be logged in to leave comments. Login now