Import local getline copy on bionic

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>