Ported to netbsd