Kaynağa Gözat

Fix header symbol collision on FreeBSD 12

Bryan Drewery 8 yıl önce
ebeveyn
işleme
eff1dac48c
2 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 2 0
      src/debug.cc
  2. 1 0
      src/debug.h

+ 2 - 0
src/debug.cc

@@ -108,6 +108,7 @@ void sdprintf (const char *format, ...)
 #endif
 }
 
+#ifdef DEBUG
 void _assert(int recoverable, const char *file, int line, const char *function,
     const char *exp, const char *format, ...)
 {
@@ -128,6 +129,7 @@ void _assert(int recoverable, const char *file, int line, const char *function,
         format != NULL ? msg : "");
     fatal(buf, recoverable);
 }
+#endif
 
 static void write_debug(bool fatal = 1)
 {

+ 1 - 0
src/debug.h

@@ -39,6 +39,7 @@ void init_signals();
 void init_debug();
 
 #ifdef DEBUG
+#undef _assert
 void _assert(int, const char *, int, const char *, const char *,
     const char *, ...) __attribute__((format(printf, 6, 7)));
 #define _ASSERT(recoverable, cond, msg...) do { \