Test for the dirfd library function (for use in some upcoming
changes).
diff --git a/configure.in b/configure.in
index 0efe7d1..ef96da3 100644
--- a/configure.in
+++ b/configure.in
@@ -2587,7 +2587,7 @@
 
 # checks for library functions
 AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
- clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
+ clock confstr ctermid dirfd execv fchmod fchown fork fpathconf ftime ftruncate \
  gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
  getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
  initgroups kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
diff --git a/pyconfig.h.in b/pyconfig.h.in
index a2bb1cd..7a20810 100644
--- a/pyconfig.h.in
+++ b/pyconfig.h.in
@@ -178,6 +178,9 @@
    */
 #undef HAVE_DIRENT_H
 
+/* Define to 1 if you have the `dirfd' function. */
+#undef HAVE_DIRFD
+
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H