summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-11-04 21:43:22 +0200
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-11-08 18:36:01 +0200
commit648116bcb890e9401559f64bb04c37b308f9123e (patch)
treece87857a24ed2c9a93f16dbaaf04d0ddcd32dc24
parent161a278afca6bfe22f5c2cba01c7100bd6244824 (diff)
os: fix sun extensions test
'else if' is not very valid, plus the logic is kind of broken, so just move it outside the ifdef in the first place. (cherry picked from b6d7b537ed8975363ad0f7c4180a62822358e418 commit)
-rw-r--r--os/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/os/utils.c b/os/utils.c
index 65e131166..9824501e7 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -55,11 +55,13 @@ OR PERFORMANCE OF THIS SOFTWARE.
/* The world's most shocking hack, to ensure we get clock_gettime() and
* CLOCK_MONOTONIC. */
+#ifdef sun /* Needed to tell Solaris headers not to restrict to */
+#define __EXTENSIONS__ /* only the functions defined in POSIX 199309. */
+#endif
+
#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>