Created attachment 451834 [details, diff]
Attached is a patch that is in official upstream master repository. It's not in the 16.08 branch so I'm guessing it will not be released in a point release. This is the official fix to this bug: https://bugs.gentoo.org/show_bug.cgi?id=582954
Patching libvncserver with that patch may cause future incompatibilities with the next release of krfb; the above mentioned bug report can thus be closed. I have tested this with gcc 6.2.0-r1 recompiling both libvncserver and krfb.
Created attachment 451838 [details]
Ebuild I used to test the patch.
I found out the hard way that kde apps don't use user patches in /etc/portage/patches even though it's EAPI 6. Bug or on purpose?
Correction. I just noticed that libvncserver upstream has that other patch in the above bug report in their master branch: https://github.com/LibVNC/libvncserver/commit/53cc1fa18a3b96d2c31a145d971017564fca39bb
This will be interesting to see how these two programs interact with each other as they both did different fixes.
(In reply to Johannes Huber from comment #3)
Sorry, wrong bug.
This fix is also needed for 16.08.3
Is this going to be added to 16.08.3 version?
I suspect rather than that, Applications release 16.12 should arrive in a few days.