diff options
Diffstat (limited to 'src/_assert.h')
-rw-r--r-- | src/_assert.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/_assert.h b/src/_assert.h index 1d7b1637..2466455f 100644 --- a/src/_assert.h +++ b/src/_assert.h @@ -5,13 +5,22 @@ #include <stdio.h> #include "stdlib/_stdlib.h" +#ifdef THREADS +_Thread_local +#endif +extern struct __checked_call { + char *file; + char *func; + unsigned long long line; +} __checked_call; + #ifndef NDEBUG #define ASSERT_NONNULL(__ptr) do { \ if (!__ptr) { \ struct __constraint_info _ci = {0}; \ _ci.func = __func__; \ __stdlib.constraint_handler("Undefined behavior: " \ - "Parameter " #__ptr " can not be NULL", &_ci, EFAULT); \ + "Parameter " #__ptr " can not be NULL", &_ci, 0 /* was EFAULT */); \ } \ } while (0) |