patch for gentoo bug #488534

Hi Rafael, here is the patch submission