Backported 4 fixes from upstream (2 of them require calling autoreconf).
Fixes: http://autobuild.buildroot.net/results/7a29e3b767e3d23dd64c130daa735ca6c062baf8
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
[yann.morin.1998@free.fr: add upstream patchwork URL for patch 7]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>