FreeBSD has slightly different wording for getdelim(), they expect a size=0 to append to the buffer, while on linux getdelim() expects a null pointer to do the same thing. Setting both (0/null) solves the problem. Patch is tiny: http://savannah.nongnu.org/bugs/download.php?file_id=20154 And already reported upstream.
Looks fine on x86-fbsd.
prefix: +1 for commit with revbump
Fixed in cvs-1.12.12-r8, let me know if we want this on the masked versions too. And it's already applied upstream: http://cvs.savannah.gnu.org/viewvc/ccvs/src/myndbm.c?root=cvs&r1=1.38&r2=1.39