lib/memory: fix indirect static link with zlib

quagga SNMP support depends on netsnmp, that optionally depends on OpenSSL,
which in turn requires zlib. zlib exports the 'zcalloc' symbol, which collides
with a function of the same name in memory.c. This is not a problem when
linking dynamically, since quagga does not use zlib directly. But static
linking fails with the error:

  CCLD     ospfd
.../output/host/usr/mips64el-buildroot-linux-uclibc/sysroot/usr/lib/libz.a(zutil.o): In function `zcalloc':
zutil.c:(.text+0x48): multiple definition of `zcalloc'
.../output/build/quagga-1.0.20160315/lib/.libs/libzebra.a(memory.o):memory.c:(.text+0x1a0): first defined here

Rename 'zcalloc' to 'zzcalloc' to avoid symbol collision.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
2 files changed