From 62a7e575b45d7955c5100961e3610975857ce81d Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 10 Aug 2015 03:14:36 +0200 Subject: Fixed a compile error in Cygwin - Follow-up to c5ff02958806ea5a672dcc9371602a6c090c6758 - Cygwin doesn't support backtrace() nor it provides execinfo.h Signed-off-by: Haru --- src/common/nullpo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/nullpo.c b/src/common/nullpo.c index a8980885f..395002b64 100644 --- a/src/common/nullpo.c +++ b/src/common/nullpo.c @@ -12,7 +12,7 @@ #include #include #include -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(CYGWIN) #include #endif @@ -28,7 +28,7 @@ struct nullpo_interface nullpo_s; * @param title Message title to display (i.e. failed assertion or nullpo info) */ void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) { -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(CYGWIN) void *array[10]; int size; char **strings; @@ -42,7 +42,7 @@ void assert_report(const char *file, int line, const char *func, const char *tar ShowError("--- %s --------------------------------------------\n", title); ShowError("%s:%d: '%s' in function `%s'\n", file, line, targetname, func); -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(CYGWIN) size = (int)backtrace(array, 10); strings = backtrace_symbols(array, size); for (i = 0; i < size; i++) -- cgit v1.2.3-70-g09d2