meson: simplify check for virnetdevbridge.c headers

The headers required by virnetdevbridge.c have all exited since
before Linux moved to git. It is sufficient to check for just
one of them in order to give an error message about needing
kernel headers installed.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2022-12-08 10:07:19 +00:00
parent d1c517d965
commit 2b23e72599

View File

@ -628,19 +628,11 @@ foreach name : headers
endif endif
endforeach endforeach
# check for kernel headers required by src/util/virnetdevbridge.c # check for kernel header required by src/util/virnetdevbridge.c
if host_machine.system() == 'linux' if host_machine.system() == 'linux'
required_headers = [ if not cc.has_header('linux/sockios.h')
'linux/param.h', error('You must install kernel-headers in order to compile libvirt with QEMU or LXC support')
'linux/sockios.h', endif
'linux/if_bridge.h',
'linux/if_tun.h',
]
foreach name : required_headers
if not cc.has_header(name)
error('You must install kernel-headers in order to compile libvirt with QEMU or LXC support')
endif
endforeach
endif endif