linux_inet_diag: improve compatibility with newer GCs