Solaris 8 x86 uses ->d_fd not ->dd_fd or dirfd()

This commit is contained in:
David Mulder
2016-08-03 13:16:30 -06:00
committed by Nico Williams
parent d6979fcc40
commit 2548b3b8aa
2 changed files with 7 additions and 1 deletions

View File

@@ -439,6 +439,10 @@ AC_HAVE_STRUCT_FIELD(DIR, dd_fd, [#include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#endif]) #endif])
AC_HAVE_STRUCT_FIELD(DIR, d_fd, [#include <sys/types.h>
#ifdef HAVE_DIRENT_H
#include <dirent.h>
#endif])
AC_BROKEN2(inet_aton, AC_BROKEN2(inet_aton,
[#ifdef HAVE_SYS_TYPES_H [#ifdef HAVE_SYS_TYPES_H

View File

@@ -802,9 +802,11 @@ int rk_flock(int fd, int operation);
#ifndef HAVE_DIRFD #ifndef HAVE_DIRFD
#ifdef HAVE_DIR_DD_FD #ifdef HAVE_DIR_DD_FD
#define dirfd(x) ((x)->dd_fd) #define dirfd(x) ((x)->dd_fd)
#elif defined(HAVE_DIR_D_FD)
#define dirfd(x) ((x)->d_fd)
#else #else
#ifndef _WIN32 /* Windows code never calls dirfd */ #ifndef _WIN32 /* Windows code never calls dirfd */
#error Missing dirfd() and ->dd_fd #error Missing dirfd() and ->dd_fd and ->d_fd
#endif #endif
#endif #endif
#endif #endif