1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: fix File.eof on FreeBSD (feof is a C macro there)

This commit is contained in:
Delyan Angelov 2022-07-28 17:26:50 +03:00
parent ed56c3957e
commit 242ade8938
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -172,7 +172,8 @@ pub fn stderr() File {
// eof returns true, when the end of file has been reached
pub fn (f &File) eof() bool {
return C.feof(f.cfile) != 0
cfile := &C.FILE(f.cfile)
return C.feof(cfile) != 0
}
// reopen allows a `File` to be reused. It is mostly useful for reopening standard input and output.