freebsd support (applies #7909)