atanunq / viu

Terminal image viewer with native support for iTerm and Kitty
MIT License
2.58k stars 58 forks source link

On FreeBSD TIOCGWINSZ that has different size #18

Closed kirillrdy closed 5 years ago

kirillrdy commented 5 years ago

on FreeBSD this fails to build due to size being different

error[E0308]: mismatched types
  --> src/size.rs:28:47
   |
28 |         let r = unsafe { ioctl(STDOUT_FILENO, TIOCGWINSZ, &w) };
   |                                               ^^^^^^^^^^
   |                                               |
   |                                               expected u64, found u32
   |                                               help: you can convert an `u32` to `u64`: `TIOCGWINSZ.into()`

error: aborting due to previous error
atanunq commented 5 years ago

Awesome, thanks for the patch. Will merge this, but in the long run I believe crossterm is the way to go.