I just ran into the same problem and I found what seems to be a fix. The issue comes because stdio.h declares its own getline function, and that function has a slightly different signature than what cvs declares it as. Also, since libc already defines getline, when we get to the cvs definition for getline, we get an error, because there are two definitions for the same function. I got past this by simply commenting out the getline declaration in cvs-1.11.23/lib/getline.h and the getline definition in cvs-1.11.23/lib/getline.c.
After this modification, cvs seems to compile and run fine.