Procházet zdrojové kódy

Merge branch 'master' into next

* master:
  Fix build where compiler does not know __predict_false
Bryan Drewery před 2 roky
rodič
revize
8ceef94235
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      src/debug.h

+ 3 - 0
src/debug.h

@@ -42,6 +42,9 @@ void got_int(int z);
 #undef _assert
 #undef _assert
 void _assert(int, const char *, int, const char *, const char *,
 void _assert(int, const char *, int, const char *, const char *,
     const char *, ...) __attribute__((format(printf, 6, 7)));
     const char *, ...) __attribute__((format(printf, 6, 7)));
+#ifndef __predict_false
+#define __predict_false(x) (x)
+#endif
 #define _ASSERT(recoverable, cond, msg...) do { \
 #define _ASSERT(recoverable, cond, msg...) do { \
   if (__predict_false(!(cond))) { \
   if (__predict_false(!(cond))) { \
     _assert(recoverable, __FILE__, __LINE__, __func__, # cond, msg); \
     _assert(recoverable, __FILE__, __LINE__, __func__, # cond, msg); \