apr-util version 1.2.7 +dfsg-2 ?
I guess you are on Debian or Ubuntu, at least those distributions seem to be bundled with apr +dfsg packages. I still wonder what +dfsg package introduces over the generic apr package.
Is it possible for you trying to install generic apr-1.2.12 and apr-util-1.2.12. It should be straigh forward to have multiple installations of apr, you just need to specify apropriate ./configure options.
BTW, I have never observed such a compilation error on RedHat based distributions
RHEL4, RHEL5, CentOS 5.1, FedoraCora 7 with gcc 3.x and 4.x versions.