From d83236f4931ad0184d663ff91e411c071a3304c8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 15 Dec 2007 17:02:55 +0000 Subject: Fix definition of dirfd(x) macro (autoconf doesn't like defining macros with parameters). --- lib/common/BoxPlatform.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib') diff --git a/lib/common/BoxPlatform.h b/lib/common/BoxPlatform.h index 4b58d31d..a3d0e7ad 100644 --- a/lib/common/BoxPlatform.h +++ b/lib/common/BoxPlatform.h @@ -165,4 +165,12 @@ #include "emu.h" #endif +// Solaris has no dirfd(x) macro or function, and we need one. +// We cannot define macros with arguments directly using AC_DEFINE, +// so do it here instead of in configure.ac. + +#ifndef HAVE_DECL_DIRFD + #define dirfd(x) (x)->d_fd +#endif + #endif // BOXPLATFORM__H -- cgit v1.2.3