@@ -, +, @@ -Wmissing-declarations -Wredundant-decls -o memcached ... -levent multiple definition of `hash'; memcached-memcached.o:memcached/hash.h:5: first defined here --- hash.c | 2 ++ hash.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) --- a/hash.c +++ a/hash.c @@ -4,6 +4,8 @@ #include "jenkins_hash.h" #include "murmur3_hash.h" +hash_func hash; + int hash_init(enum hashfunc_type type) { switch(type) { case JENKINS_HASH: --- a/hash.h +++ a/hash.h @@ -2,7 +2,7 @@ #define HASH_H typedef uint32_t (*hash_func)(const void *key, size_t length); -hash_func hash; +extern hash_func hash; enum hashfunc_type { JENKINS_HASH=0, MURMUR3_HASH --