src: conditionalize use of net/if.h

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>
This commit is contained in:
Daniel P. Berrangé
2020-01-22 11:48:45 +00:00
parent 2b45f453a3
commit 7f3eb533f4
7 changed files with 14 additions and 6 deletions

View File

@@ -2338,4 +2338,4 @@ exclude_file_name_regexp--sc_prohibit_backslash_alignment = \
^build-aux/syntax-check\.mk$$
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
^src/util/virfile\.c$$
^src/util/(virfile|virnetdev|virnetdevip)\.[c,h]|$$