Closed datafu closed 10 months ago
I have tested to build using ubuntu 20.04 with an older gcc 4.4 and cmake which seems to work (link to job).
Are you building using CMake or directly via Makefile?
Does it work if you add the define _GNU_SOURCE
?
gcc --version gcc (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3) Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
then, I entered hiredis-cluster-0.10.0 and Using make, Just reported an error
[root@radius hiredis-cluster-0.10.0]# make cc -c -O3 -std=c99 -fPIC -Wall -Wextra -pedantic -Werror -Wstrict-prototypes -Wwrite-strings -Wno-missing-field-initializers -g -ggdb hircluster.c cc1: warnings being treated as errors hircluster.c: In function ‘__redisClusterSetError’: hircluster.c:218: error: implicit declaration of function ‘strerror_r’ make: *** [hircluster.o] Error 1
hircluster.c:218:9: 错误:隐式声明函数‘strerror_r’ [-Werror=implicit-function-declaration] strerror_r(errno, cc->errstr, sizeof(cc->errstr)); ^ cc1: all warnings being treated as errors
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux gcc --version gcc (GCC) 4.9.4