In order to build telnet on the arm, I had to patch termcap.h. The change was recommended by Philip Blundell. This may/should affect other architectures as well, I think. Let's see if I can do this submit patch by e-mail thing.
Fixed in dist-6.0 libtermcap-2.0.8-12.