separate bsd specific code