summaryrefslogtreecommitdiff
path: root/source4/heimdal_build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal_build')
-rw-r--r--source4/heimdal_build/config.h4
-rw-r--r--source4/heimdal_build/roken.h9
2 files changed, 9 insertions, 4 deletions
diff --git a/source4/heimdal_build/config.h b/source4/heimdal_build/config.h
index be544cb83b..35981b85d2 100644
--- a/source4/heimdal_build/config.h
+++ b/source4/heimdal_build/config.h
@@ -9,10 +9,6 @@
#include "include/config.h"
#include "../replace/replace.h"
-#if !defined(HAVE_DIRFD) && !defined(HAVE_DIRFD_DECL) && !defined(dirfd)
-#define dirfd(d) (-1)
-#endif
-
#define RCSID(msg) struct __rcsid { int __rcsdi; }
#define KRB5
diff --git a/source4/heimdal_build/roken.h b/source4/heimdal_build/roken.h
index 172dc76a29..d8c49fb688 100644
--- a/source4/heimdal_build/roken.h
+++ b/source4/heimdal_build/roken.h
@@ -119,6 +119,15 @@
#define STRERROR_R_PROTO_COMPATIBLE
#endif
+#ifndef HAVE_DIRFD
+#ifdef HAVE_DIR_DD_FD
+#define dirfd(x) ((x)->dd_fd)
+#else
+#define dirfd(d) (-1)
+#endif
+#define HAVE_DIRFD 1
+#endif
+
/* we lie about having pidfile() so that NetBSD5 can compile. Nothing
in the parts of heimdal we use actually uses pidfile(), and we