mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
meson: add members check
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
parent
f46965b5f5
commit
ce9b4462f7
@ -427,15 +427,6 @@ then
|
||||
fi
|
||||
AM_CONDITIONAL([WITH_NODE_DEVICES], [test "$with_nodedev" = "yes"])
|
||||
|
||||
# Check for Linux vs. BSD ifreq members
|
||||
AC_CHECK_MEMBERS([struct ifreq.ifr_newname,
|
||||
struct ifreq.ifr_ifindex,
|
||||
struct ifreq.ifr_index,
|
||||
struct ifreq.ifr_hwaddr],
|
||||
[], [],
|
||||
[#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
])
|
||||
|
||||
# Check for BSD kvm (kernel memory interface)
|
||||
if test $with_freebsd = yes; then
|
||||
|
19
meson.build
19
meson.build
@ -848,6 +848,25 @@ if host_machine.system() == 'windows'
|
||||
endif
|
||||
|
||||
|
||||
# check various members
|
||||
|
||||
members = [
|
||||
# Check for Linux vs. BSD ifreq members
|
||||
[ 'struct ifreq', 'ifr_newname', '#include <sys/socket.h>\n#include <net/if.h>' ],
|
||||
[ 'struct ifreq', 'ifr_ifindex', '#include <sys/socket.h>\n#include <net/if.h>' ],
|
||||
[ 'struct ifreq', 'ifr_index', '#include <sys/socket.h>\n#include <net/if.h>' ],
|
||||
[ 'struct ifreq', 'ifr_hwaddr', '#include <sys/socket.h>\n#include <net/if.h>' ],
|
||||
]
|
||||
|
||||
foreach member : members
|
||||
if cc.has_member(member[0], member[1], prefix: member[2])
|
||||
type = member[0].underscorify().to_upper()
|
||||
member = member[1].underscorify().to_upper()
|
||||
conf.set('HAVE_@0@_@1@'.format(type, member), 1)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
|
||||
# define top include directory
|
||||
|
||||
top_inc_dir = include_directories('.')
|
||||
|
Loading…
Reference in New Issue
Block a user