Ran into som problems while compiling pdns 2.9.22 on squeeze. It seem to be related to gcc-4.4 having changed it’s include hierarchy.
mailman.powerdns.com pointed me in the correct direction.
After adding
#include < stdio.h >
in pdns/dnsparser.cc and pdns/rcpgenerator.cc it built fine.