diff --git a/include/jemalloc/internal/util.h b/include/jemalloc/internal/util.h index b400f231..6646386e 100644 --- a/include/jemalloc/internal/util.h +++ b/include/jemalloc/internal/util.h @@ -39,6 +39,15 @@ # define unlikely(x) !!(x) #endif +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L +#include +#else +#if !defined(JEMALLOC_INTERNAL_UNREACHABLE) +# error JEMALLOC_INTERNAL_UNREACHABLE should have been defined by configure +#endif +#define unreachable() JEMALLOC_INTERNAL_UNREACHABLE() +#endif + /* Set error code. */ UTIL_INLINE void set_errno(int errnum) {