If you have an earlier version that compiles ok, look in
/usr/src/linux/arch/x86/apic/apic.c. Are the #includes the
same as they are in the openvz kernel version with
the error? If they are, then the missing #include is in
some other header (you can have #includes that include
other .h files that include other .h files, etc; the missing
one could be down the chain somewhere).

Then compare the kernel .config files between the version
that compiles ok and the one that does not. Do they match?
If not, what options are enabled in the .config file for the
kernel that compiles that are not enabled in the kernel
that fails to compile?_________________TIA

If you have an earlier version that compiles ok, look in
/usr/src/linux/arch/x86/apic/apic.c. Are the #includes the
same as they are in the openvz kernel version with
the error? If they are, then the missing #include is in
some other header (you can have #includes that include
other .h files that include other .h files, etc; the missing
one could be down the chain somewhere).

Then compare the kernel .config files between the version
that compiles ok and the one that does not. Do they match?
If not, what options are enabled in the .config file for the
kernel that compiles that are not enabled in the kernel
that fails to compile?

i tried looking in to it but my old kernel is really old (2.6.27) and i got a little lost

You could try stepping forward 1 openvz kernel version at a time
from 2.6.27 and use the last one that compiles before the one that
does not compile. Then compare the apic.c #includes from the
one that compiles with the apic.c #includes from the one with
the error (and likewise for the kernel .config options)._________________TIA

According this thread: http://bugs.funtoo.org/browse/FL-379 older kernels are building with gcc-4.4.5.
But current gentoo shiped with gcc 4.6.3 so unmask sys-kernel/openvz-sources-2.6.32.74.10 by adding it to package.keywords

After looking inside of ebuild file i see this: K_EXTRAEWARN="This kernel is stable only when built with gcc-4.4.x and is known
to oops in random places if built with newer compilers."