|
|
|
@ -1268,6 +1268,7 @@ config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) |
|
|
|
config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) |
|
|
|
|
|
|
|
# has_function |
|
|
|
config_host_data.set('CONFIG_ACCEPT4', cc.has_function('accept4')) |
|
|
|
config_host_data.set('CONFIG_CLOCK_ADJTIME', cc.has_function('clock_adjtime')) |
|
|
|
config_host_data.set('CONFIG_DUP3', cc.has_function('dup3')) |
|
|
|
config_host_data.set('CONFIG_FALLOCATE', cc.has_function('fallocate')) |
|
|
|
@ -1302,6 +1303,10 @@ config_host_data.set('CONFIG_FIEMAP', |
|
|
|
config_host_data.set('CONFIG_GETRANDOM', |
|
|
|
cc.has_function('getrandom') and |
|
|
|
cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) |
|
|
|
config_host_data.set('CONFIG_INOTIFY', |
|
|
|
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_MACHINE_BSWAP_H', |
|
|
|
cc.has_header_symbol('machine/bswap.h', 'bswap32', |
|
|
|
prefix: '''#include <sys/endian.h> |
|
|
|
@ -1345,6 +1350,15 @@ config_host_data.set('CONFIG_MADVISE', cc.compiles(gnu_source_prefix + ''' |
|
|
|
config_host_data.set('CONFIG_MEMFD', cc.compiles(gnu_source_prefix + ''' |
|
|
|
#include <sys/mman.h> |
|
|
|
int main(void) { return memfd_create("foo", MFD_ALLOW_SEALING); }''')) |
|
|
|
config_host_data.set('CONFIG_PIPE2', cc.compiles(gnu_source_prefix + ''' |
|
|
|
#include <unistd.h> |
|
|
|
#include <fcntl.h> |
|
|
|
|
|
|
|
int main(void) |
|
|
|
{ |
|
|
|
int pipefd[2]; |
|
|
|
return pipe2(pipefd, O_CLOEXEC); |
|
|
|
}''')) |
|
|
|
config_host_data.set('CONFIG_POSIX_MADVISE', cc.compiles(gnu_source_prefix + ''' |
|
|
|
#include <sys/mman.h> |
|
|
|
#include <stddef.h> |
|
|
|
@ -1354,6 +1368,18 @@ config_host_data.set('CONFIG_SIGNALFD', cc.compiles(gnu_source_prefix + ''' |
|
|
|
#include <sys/syscall.h> |
|
|
|
#include <signal.h> |
|
|
|
int main(void) { return syscall(SYS_signalfd, -1, NULL, _NSIG / 8); }''')) |
|
|
|
config_host_data.set('CONFIG_SPLICE', cc.compiles(gnu_source_prefix + ''' |
|
|
|
#include <unistd.h> |
|
|
|
#include <fcntl.h> |
|
|
|
#include <limits.h> |
|
|
|
|
|
|
|
int main(void) |
|
|
|
{ |
|
|
|
int len, fd = 0; |
|
|
|
len = tee(STDIN_FILENO, STDOUT_FILENO, INT_MAX, SPLICE_F_NONBLOCK); |
|
|
|
splice(STDIN_FILENO, NULL, fd, NULL, len, SPLICE_F_MOVE); |
|
|
|
return 0; |
|
|
|
}''')) |
|
|
|
|
|
|
|
# Some versions of Mac OS X incorrectly define SIZE_MAX |
|
|
|
config_host_data.set('HAVE_BROKEN_SIZE_MAX', not cc.compiles(''' |
|
|
|
|