diff options
author | Daniel Black <daniel@mariadb.org> | 2023-02-06 19:16:15 +1100 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2023-02-06 21:25:02 +1100 |
commit | 29b4bd4ea9d1b7cd6a241c83ff0daf7856107c55 (patch) | |
tree | 724b87adcb4ce253965340588f44adc4a5f6d136 /mysys | |
parent | 9f16d153579eb30639b5f7e8a827d65f44475979 (diff) | |
download | mariadb-git-29b4bd4ea9d1b7cd6a241c83ff0daf7856107c55.tar.gz |
MDEV-30573 Server doesn't build with GCOV by GCC 11+
__gcov_flush was never an external symbol in the documentation.
It was removed in gcc-11. The correct function to use is __gcov_dump
which is defined in the gcov.h header.
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/stacktrace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c index 844d8a0b28f..f203bba4d8d 100644 --- a/mysys/stacktrace.c +++ b/mysys/stacktrace.c @@ -34,6 +34,9 @@ #include <execinfo.h> #endif +#ifdef HAVE_gcov +#include <gcov.h> +#endif /** Default handler for printing stacktrace */ @@ -409,9 +412,6 @@ end: /* Produce a core for the thread */ void my_write_core(int sig) { -#ifdef HAVE_gcov - extern void __gcov_flush(void); -#endif signal(sig, SIG_DFL); #ifdef HAVE_gcov /* @@ -419,7 +419,7 @@ void my_write_core(int sig) information from this process, causing gcov output to be incomplete. So we force the writing of coverage information here before terminating. */ - __gcov_flush(); + __gcov_dump(); #endif pthread_kill(pthread_self(), sig); #if defined(P_MYID) && !defined(SCO) |