diff options
author | Kanak Kshetri <kanakkshetri@fastmail.fm> | 2020-04-01 07:34:16 -0500 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2020-04-09 15:53:21 -0700 |
commit | 7bd7f6dc88f620ac77fe6b5acd5ffb06105c759d (patch) | |
tree | 4c865b96b775f6a5a7ea5915051b6321b132589f /testapp.c | |
parent | c1127a8aaf902203bda391a45af51d95378c5cd8 (diff) | |
download | memcached-7bd7f6dc88f620ac77fe6b5acd5ffb06105c759d.tar.gz |
testapp: Fix failure with -flto=auto
Diffstat (limited to 'testapp.c')
-rw-r--r-- | testapp.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -21,6 +21,7 @@ #include "config.h" #include "cache.h" #include "hash.h" +#include "jenkins_hash.h" #include "stats_prefix.h" #include "util.h" #include "protocol_binary.h" @@ -42,10 +43,7 @@ struct conn { ssize_t (*write)(struct conn *c, const void *buf, size_t count); }; -struct settings { - char *hash_algorithm; -}; -struct settings settings; +hash_func hash; static ssize_t tcp_read(struct conn *c, void *buf, size_t count); static ssize_t tcp_write(struct conn *c, const void *buf, size_t count); @@ -2306,8 +2304,9 @@ int main(int argc, char **argv) enable_ssl = true; } #endif - /* Stats prefix test is sensitive to the choice of hash function */ - hash_init(JENKINS_HASH); + /* Initialized directly instead of using hash_init to avoid pulling in + the definition of settings struct from memcached.h */ + hash = jenkins_hash; stats_prefix_init(':'); for (num_cases = 0; testcases[num_cases].description; num_cases++) { |