BSD compat stuff