mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-11-24 05:33:12 -05:00
use compiler extension instead of C11 noreturn
C11 noreturn isn't available in C++.
This commit is contained in:
parent
7106bff27f
commit
d8817417cc
2 changed files with 3 additions and 3 deletions
4
util.h
4
util.h
|
|
@ -2,7 +2,9 @@
|
|||
#define UTIL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdnoreturn.h>
|
||||
|
||||
// C11 noreturn doesn't work in C++
|
||||
#define noreturn __attribute__((noreturn))
|
||||
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue