From e4c75252a962341c35ef45989ea12c637f7b3a1b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Mar 2010 22:47:34 +1100 Subject: s4-heimdal: a better way of handling dirfd() This prevents us getting thousands of warnings about dirfd() on solaris --- source4/heimdal_build/config.h | 4 ---- source4/heimdal_build/roken.h | 9 +++++++++ 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'source4/heimdal_build') 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 -- cgit