move accept4 to generic code as in freebsd