summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2006-10-31 15:57:59 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2006-10-31 15:57:59 -0800
commita2434ec5f3c9dc79d1f05c2d704a82a766718ed4 (patch)
treee267458874b61942843d65c8053206c999ea7c9b /os
parent645d0576205532a3610ae351267d5b84d76236bd (diff)
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.
Diffstat (limited to 'os')
-rw-r--r--os/utils.c2
1 files changed, 2 insertions, 0 deletions
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 <time.h>