Fixes compilation with GCC 10. Backported upstream patch to fix compilation without IPv6. Signed-off-by: Rosen Penev <rosenp@gmail.com>