patch for https://bugs.gentoo.org/show_bug.cgi?id=358271