As stated in this comment in a bug report for virtualbox-modules: https://bugs.gentoo.org/show_bug.cgi?id=433796#c21 The file "include/linux/iommu.h" in the gentoo-sources-3.6.11 package makes use of a function named ERR_PTR() which is defined in "include/linux/err.h", but the latter is not included in iommu.h, so any software that includes iommu.h would sooner or later run into the issue, so it is not a bug related to virtualbox-modules but to the include file in the kernel source. Reproducible: Always Steps to Reproduce: 1. Emerge virtualbox-modules-4.1.22 (amd64) with gentoo-sources-3.6.11 kernel installed & active. 2. The build fails because the function ERR_PTR() is undefined and is therefor assumed to return int instead of an expected pointer type. 3. Fix: see this comment again: https://bugs.gentoo.org/show_bug.cgi?id=433796#c21 I suggest to move that bug to gentoo-sources and then add the easy fix.
Can you please report this upstream at https://bugzilla.kernel.org/ and leave a link to that bug here? Gentoo Sources attempts to keep the patch set as minimal as possible; so, if something can be fixed upstream we await their response first before taking a vendor decision.
here: https://bugzilla.kernel.org/show_bug.cgi?id=52051
Kernel upstream has decided that VirtualBox should include both files. Hence, this bug has been assigned to the app-emulation/virtualbox-modules maintainers.
Created attachment 335276 [details, diff] vboxpci patch to add missing header include
Looks like this is fixed in all recent kernels, please reopen if there are still any problems. See upstream commit here: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/include/linux/iommu.h?id=9a08d3766874835f4eba1b3d66938326c069d817