mirror of
https://github.com/haproxy/haproxy.git
synced 2026-04-15 21:59:41 -04:00
BUILD: debug: also declare strlen() in __ABORT_NOW()
Previous commit 8f204fa8ae ("MINOR: debug: print gdb hints when crashing")
broken on the CI where strlen() isn't known. Let's forward-declare it in
the __ABORT_NOW() functions, just like write(). No backport is needed.
This commit is contained in:
parent
8f204fa8ae
commit
2d27c80288
1 changed files with 2 additions and 0 deletions
|
|
@ -124,6 +124,7 @@ static __attribute__((noinline,noreturn,unused)) void abort_with_line(uint line)
|
|||
|
||||
#define __ABORT_NOW(file, line, ...) do { \
|
||||
extern ssize_t write(int, const void *, size_t); \
|
||||
extern size_t strlen(const char *s); \
|
||||
const char *msg; \
|
||||
if (sizeof("" __VA_ARGS__) > 1) \
|
||||
complain(NULL, "\nABORT at " file ":" #line ": " __VA_ARGS__ "\n", 1); \
|
||||
|
|
@ -141,6 +142,7 @@ static __attribute__((noinline,noreturn,unused)) void abort_with_line(uint line)
|
|||
*/
|
||||
#define __ABORT_NOW(file, line, ...) do { \
|
||||
extern ssize_t write(int, const void *, size_t); \
|
||||
extern size_t strlen(const char *s); \
|
||||
const char *msg; \
|
||||
if (sizeof("" __VA_ARGS__) > 1) \
|
||||
complain(NULL, "\nABORT at " file ":" #line ": " __VA_ARGS__ "\n", 1); \
|
||||
|
|
|
|||
Loading…
Reference in a new issue