diff options
author | Daniel Black <daniel@mariadb.org> | 2020-12-14 15:06:42 +1100 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2020-12-15 14:47:16 +1100 |
commit | 384f107ae586a9b4949ec9fd5393959a26d866cd (patch) | |
tree | ca2fe439a6ba56f560cfe74e2c6261e0b98591d9 /mysys | |
parent | 4fa44c584cf14c72fdbb15b88d406fd4e9e42c18 (diff) | |
download | mariadb-git-384f107ae586a9b4949ec9fd5393959a26d866cd.tar.gz |
MDEV-21646: postfix - my_addr_resolve: static Dl_info info
Encountered the linker failure on Debug build in 10.4:
[53/585] Linking CXX executable unittest/sql/mf_iocache-t
FAILED: unittest/sql/mf_iocache-t
: && /usr/bin/c++ -pie -fPIC -fstack-protector --param=ssp-buffer-size=4 -fPIC -g -DENABLED_DEBUG_SYNC -ggdb3 -DSAFE_MUTEX -DSAFEMALLOC -DTRASH_FREED_MEMORY -Wall -Wextra -Wno-format-truncation -Wno-init-self -Wno-nonnull-compare -Wno-unused-parameter -Woverloaded-virtual -Wnon-virtual-dtor -Wvla -Wwrite-strings -Werror -Wl,-z,relro,-z,now unittest/sql/CMakeFiles/mf_iocache-t.dir/mf_iocache-t.cc.o unittest/sql/CMakeFiles/mf_iocache-t.dir/__/__/sql/mf_iocache_encr.cc.o -o unittest/sql/mf_iocache-t -lpthread mysys/libmysys.a unittest/mytap/libmytap.a mysys_ssl/libmysys_ssl.a mysys/libmysys.a dbug/libdbug.a mysys/libmysys.a dbug/libdbug.a -lz -lm strings/libstrings.a -lpthread -lssl -lcrypto -ldl && :
/usr/bin/ld: mysys/libmysys.a(my_addr_resolve.c.o):/home/dan/repos/mariadb-server-10.4/mysys/my_addr_resolve.c:173: multiple definition of `info'; unittest/sql/CMakeFiles/mf_iocache-t.dir/mf_iocache-t.cc.o:/home/dan/repos/mariadb-server-10.4/unittest/sql/mf_iocache-t.cc:99: first defined here
We make Dl_info static as in MDEV-21646 moving it out of the function
was the main goal and having it scope limited by static doesn't affect
the function.
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/my_addr_resolve.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mysys/my_addr_resolve.c b/mysys/my_addr_resolve.c index 3a49c749010..f0c0d214171 100644 --- a/mysys/my_addr_resolve.c +++ b/mysys/my_addr_resolve.c @@ -170,7 +170,7 @@ static pid_t pid; static char addr2line_binary[1024]; static char output[1024]; static struct pollfd poll_fds; -Dl_info info; +static Dl_info info; int start_addr2line_fork(const char *binary_path) { |