From a2434ec5f3c9dc79d1f05c2d704a82a766718ed4 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 31 Oct 2006 15:57:59 -0800 Subject: Make _POSIX_C_SOURCE hack work with Solaris headers Solaris headers are very literal - if you ask for POSIX_C_SOURCE 199309L, they limit to only the functions in that standard and no more, unless you also specify __EXTENSIONS__ to allow functions beyond the standard base. --- os/utils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'os') diff --git a/os/utils.c b/os/utils.c index 7d258a444..f7cdb8296 100644 --- a/os/utils.c +++ b/os/utils.c @@ -58,6 +58,8 @@ OR PERFORMANCE OF THIS SOFTWARE. #ifdef _POSIX_C_SOURCE #define _SAVED_POSIX_C_SOURCE _POSIX_C_SOURCE #undef _POSIX_C_SOURCE +#else if defined(sun) /* Needed to tell Solaris headers not to restrict to */ +#define __EXTENSIONS__ /* only the functions defined in POSIX 199309. */ #endif #define _POSIX_C_SOURCE 199309L #include -- cgit v1.2.3