The net/if.h is not portable so we must check for its existance and avoid using it when missing. Some use of net/if.h was redundant and could be removed. Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>