cc.has_header_symbol('sys/inotify.h', 'inotify_init'))
config_host_data.set('CONFIG_INOTIFY1',
cc.has_header_symbol('sys/inotify.h', 'inotify_init1'))
-config_host_data.set('CONFIG_IOVEC',
- cc.has_header_symbol('sys/uio.h', 'struct iovec'))
config_host_data.set('CONFIG_MACHINE_BSWAP_H',
cc.has_header_symbol('machine/bswap.h', 'bswap32',
prefix: '''#include <sys/endian.h>
cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
config_host_data.set('HAVE_OPTRESET',
cc.has_header_symbol('getopt.h', 'optreset'))
-config_host_data.set('HAVE_UTMPX',
- cc.has_header_symbol('utmpx.h', 'struct utmpx'))
config_host_data.set('HAVE_IPPROTO_MPTCP',
cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
cc.has_member('struct stat', 'st_atim',
prefix: '#include <sys/stat.h>'))
+# has_type
+config_host_data.set('CONFIG_IOVEC',
+ cc.has_type('struct iovec',
+ prefix: '#include <sys/uio.h>'))
+config_host_data.set('HAVE_UTMPX',
+ cc.has_type('struct utmpx',
+ prefix: '#include <utmpx.h>'))
+
config_host_data.set('CONFIG_EVENTFD', cc.links('''
#include <sys/eventfd.h>
int main(void) { return eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); }'''))
#include <stddef.h>
int main(void) { return posix_madvise(NULL, 0, POSIX_MADV_DONTNEED); }'''))
-config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links('''
+config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_W_TID', cc.links(gnu_source_prefix + '''
#include <pthread.h>
static void *f(void *p) { return NULL; }
pthread_setname_np(thread, "QEMU");
return 0;
}''', dependencies: threads))
-config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links('''
+config_host_data.set('CONFIG_PTHREAD_SETNAME_NP_WO_TID', cc.links(gnu_source_prefix + '''
#include <pthread.h>
static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; }
have_l2tpv3 = false
if not get_option('l2tpv3').disabled() and have_system
- have_l2tpv3 = (cc.has_header_symbol('sys/socket.h', 'struct mmsghdr')
- and cc.has_header('linux/ip.h'))
+ have_l2tpv3 = cc.has_type('struct mmsghdr',
+ prefix: gnu_source_prefix + '''
+ #include <sys/socket.h>
+ #include <linux/ip.h>''')
endif
config_host_data.set('CONFIG_L2TPV3', have_l2tpv3)
# xfs headers will not try to redefine structs from linux headers
# if this macro is set.
config_host_data.set('HAVE_FSXATTR', cc.links('''
- #include <linux/fs.h>'
+ #include <linux/fs.h>
struct fsxattr foo;
int main(void) {
return 0;