Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Based on upstream patch. Signed-off-by: Rosen Penev <rosenp@gmail.com>