Show More
@@ -145,7 +145,7 b' lazy_static::lazy_static! {' | |||
|
145 | 145 | |
|
146 | 146 | /// Same as https://github.com/python/cpython/blob/v3.10.0/Modules/socketmodule.c#L5414 |
|
147 | 147 | const BUFFER_SIZE: usize = 1024; |
|
148 |
let mut buffer = [0 |
|
|
148 | let mut buffer = [0 as libc::c_char; BUFFER_SIZE]; | |
|
149 | 149 | let hostname_bytes = unsafe { |
|
150 | 150 | let result = libc::gethostname(buffer.as_mut_ptr(), BUFFER_SIZE); |
|
151 | 151 | if result != 0 { |
General Comments 0
You need to be logged in to leave comments.
Login now