diff options
author | Zhangjin Wu | 2023-07-16 02:22:15 +0800 |
---|---|---|
committer | Willy Tarreau | 2023-08-23 04:40:22 +0200 |
commit | d7f16723d37c6aeaa4fb93b433db367ad8398b9c (patch) | |
tree | b7c9dc1b50143f1b0992c7d037c6c66e3f8e2f30 /tools/include | |
parent | 17336755150b19a697079f9c3945eff7882a77c5 (diff) |
tools/nolibc: stackprotector.h: add empty __stack_chk_init for !_NOLIBC_STACKPROTECTOR
Let's define an empty __stack_chk_init for the !_NOLIBC_STACKPROTECTOR
branch.
This allows to remove #ifdef around every call of __stack_chk_init().
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'tools/include')
-rw-r--r-- | tools/include/nolibc/stackprotector.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/include/nolibc/stackprotector.h b/tools/include/nolibc/stackprotector.h index 88f7b2d098ff..b620f2b9578d 100644 --- a/tools/include/nolibc/stackprotector.h +++ b/tools/include/nolibc/stackprotector.h @@ -45,6 +45,8 @@ void __stack_chk_init(void) if (__stack_chk_guard != (uintptr_t) &__stack_chk_guard) __stack_chk_guard ^= (uintptr_t) &__stack_chk_guard; } +#else /* !defined(_NOLIBC_STACKPROTECTOR) */ +__inline__ void __stack_chk_init(void) {} #endif /* defined(_NOLIBC_STACKPROTECTOR) */ #endif /* _NOLIBC_STACKPROTECTOR_H */ |