Backport hiredis issue 525 fix to compile on FreeBSD.
Backport hiredis issue 525 fix to compile on FreeBSD.

Close #4947.

PKRoma/redis,charsyam/redis,pmem/redis,pmem/redis,PKRoma/redis,oranagra/redis,spinlock/redis,neomantra/redis,nnog/redis,spinlock/redis,charsyam/redis,oranagra/redis,ofirluzon/redis,PKRoma/redis,charsyam/redis,ofirluzon/redis,GitHubMota/redis,soloestoy/redis,PKRoma/redis,soloestoy/redis,yossigo/redis,GitHubMota/redis,antirez/redis,PKRoma/redis,charsyam/redis,GitHubMota/redis,ofirluzon/redis,neomantra/redis,nnog/redis,soloestoy/redis,yossigo/redis,ofirluzon/redis,nnog/redis,soloestoy/redis,yossigo/redis,oranagra/redis,soloestoy/redis,soveran/redis,yossigo/redis,antirez/redis,oranagra/redis,spinlock/redis,neomantra/redis,soveran/redis,ctripcorp/redis,antirez/redis,yossigo/redis,pmem/redis,nnog/redis,soveran/redis,oranagra/redis,spinlock/redis,neomantra/redis,pmem/redis,antirez/redis,GitHubMota/redis,ctripcorp/redis,ctripcorp/redis,ofirluzon/redis,ctripcorp/redis,charsyam/redis,soveran/redis,neomantra/redis