http://bugs.gentoo.org/attachment.cgi?id=261534&action=diff&context=patch&collapsed=&headers=1&format=raw