MFC r250545:
  Some filesystems (NFS in particular) do not fill out the d_type field when
  returning directory entries through readdir(3). In this case we need to
  obtain the file type ourselves; otherwise newsyslog -t will not be able to
  find archived log files and will fail to both delete old log files and to
  do interval-based rotations properly.


git-svn-id: svn://svn.freebsd.org/base/stable/9@251110 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revert my previous merge. There's a variable name difference between head
and stable (dirfd vs. dir_fd) and I managed to get it wrong again when I
did the MFC, even after I tested.


git-svn-id: svn://svn.freebsd.org/base/stable/9@251113 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge remote-tracking branch 'upstream/svn_stable_9' into svn_stable_9