Build failed on OpenBSD because OpenBSD doesn't have reallocf()
Author: semioCreated Feb 7, 2021Updated Jun 17, 2026
Labelsbug
What version of shadowsocks-libev are you using?
master branch @ 13f472077d52c147057a198e552ea8cd6791631a
What operating system are you using?
OpenBSD -current
What did you do?
build shadowsocks-libev from source
What did you expect to see?
build should be succeed because all dependencies are in ports
What did you see instead?
linker error:
......
CCLD ss-local
ld: error: undefined symbol: reallocf
>>> referenced by allocator.c:317 (src/libcork/core/allocator.c:317)
>>> libcork_la-allocator.o:(cork_stdlib_alloc__realloc) in archive ../libcork/.libs/libcork.a
>>> did you mean: realloc
>>> defined in: /usr/bin/../lib/libc.so.96.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)I set CORK_HAVE_REALLOCF to 0 in libcork/include/libcork/config/bsd.h and it worked. ss-local works fine, although I am not sure if using realloc() is the fix.
Source: shadowsocks/shadowsocks-libev