summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-08-10 03:14:36 +0200
committerHaru <haru@dotalux.com>2015-08-10 03:14:36 +0200
commit62a7e575b45d7955c5100961e3610975857ce81d (patch)
treefe4285b264710175ca9deb6d208ece0f0f01fc5a /src/common
parent79891f8dbbe2c9f930f4b162316f8401ff05da02 (diff)
downloadhercules-62a7e575b45d7955c5100961e3610975857ce81d.tar.gz
hercules-62a7e575b45d7955c5100961e3610975857ce81d.tar.bz2
hercules-62a7e575b45d7955c5100961e3610975857ce81d.tar.xz
hercules-62a7e575b45d7955c5100961e3610975857ce81d.zip
Fixed a compile error in Cygwin
- Follow-up to c5ff02958806ea5a672dcc9371602a6c090c6758 - Cygwin doesn't support backtrace() nor it provides execinfo.h Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/nullpo.c6
1 files 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 <stdarg.h>
#include <stdlib.h>
#include <string.h>
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(CYGWIN)
#include <execinfo.h>
#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++)