Hi,
redis 6.2.1 build failed on FreeBSD 11.4, both amd64 and i386. The platform has no malloc.h, but stdlib.h instead.
Not tested patch is attached.
patch-zmalloc.h.txt
Could you please review.
Thank you.
gmake[3]: Leaving directory '/wrkdirs/usr/ports/databases/redis-devel/work/redis-6.2.1/deps'
gcc10 -pedantic -DREDIS_STATIC='' -Wno-c11-extensions -std=c99 -Wall -W -Wno-missing-field-initializers -O2 -pipe -march=i586 -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc10 -fno-strict-aliasing -I../deps/hiredis -I../deps/linenoise -I../deps/lua/src -I../deps/hdr_histogram -MMD -o adlist.o -c adlist.c
In file included from zmalloc.h:77,
from adlist.c:34:
/usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>"
3 | #error "<malloc.h> has been replaced by <stdlib.h>"
| ^~~~~
Comment From: yossigo
@osokin I've changed the patch slightly so it will not affect anything other than FreeBSD. Can you let me know if #8603 makes sense/works for you? Thanks!
Comment From: yossigo
Fixed by #8603
Comment From: osokin
@osokin I've changed the patch slightly so it will not affect anything other than FreeBSD. Can you let me know if #8603 makes sense/works for you? Thanks!
@yossigo I've just tested your patch on 11.4-RELEASE-p8 and it works, thanks!