os: fix getline warning for linux

pull/3869/head
Nicolas Sauzede 2020-02-28 02:43:42 +01:00 committed by GitHub
parent b8f6284daf
commit f5fdbfd004
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -705,7 +705,7 @@ pub fn get_raw_line() string {
} $else {
max := size_t(0)
mut buf := byteptr(0)
nr_chars := C.getline(&buf, &max, stdin)
nr_chars := C.getline(&charptr(buf), &max, stdin)
defer { unsafe{ free(buf) } }
if nr_chars == 0 || nr_chars == -1 {
return ''