summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan C. Gordon <icculus@icculus.org>2010-01-13 07:00:20 +0000
committerRyan C. Gordon <icculus@icculus.org>2010-01-13 07:00:20 +0000
commitbb12640ed47cd8ddcf35b37b32a8eac367097872 (patch)
tree990045e3d6f708a51a01f7c5724e1e38d0da1a69
parent5f76c6b2d5205a640f21b7ac892894cca5337e73 (diff)
Fixed build problems with gcc __attribute__.
-rw-r--r--src/SDL_assert.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/SDL_assert.c b/src/SDL_assert.c
index 3799e61e7c..c7bc230341 100644
--- a/src/SDL_assert.c
+++ b/src/SDL_assert.c
@@ -31,6 +31,7 @@
#else /* fprintf, _exit(), etc. */
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#endif
/* We can keep all triggered assertions in a singly-linked list so we can
@@ -43,9 +44,13 @@ static SDL_assert_data *triggered_assertions = &assertion_list_terminator;
static void
debug_print(const char *fmt, ...)
-//#ifdef __GNUC__
-//__attribute__((format (printf, 1, 2)))
-//#endif
+#ifdef __GNUC__
+__attribute__((format (printf, 1, 2)))
+#endif
+;
+
+static void
+debug_print(const char *fmt, ...)
{
#ifdef _WINDOWS
/* Format into a buffer for OutputDebugStringA(). */