Just posted this: stackoverflow.com/questions/78708354/… This has been an issue all year but I haven't bothered looking into it since it isn't on my normal dev environment. A bit embarrassed about the solution, but I only found it while writing it up so I thought I'd still post it on the off chance it helps someone else.
Also, not fishing for votes. I just thought others might get a chuckle out of it at my expense.
A weird fix: https://github.com/Canop/broot/pull/897/commits/ac0ffb02dbb3504cda1cf3eec54588735a0977b7 I prevent the ioctl call from "not working" in release mode by adding a debug call using its returned value.
@DenysSéguret It could be better if it was *mut _ yeah, but unfortunately ioctl uses C variadic arguments so you're out of luck on having a well-typed API for that call. :/