Patch taken from Debian. Refresh patches Signed-off-by: Rosen Penev <rosenp@gmail.com> (cherry picked from commit 78b0106f7d5093641f68d37c041a5863eb9dd9a0)