meson: define _GNU_SOURCE to detect copy_file_range() (#7734)

Follow-up for bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f of git
repository for glibc.

Recently glibc added `copy_file_range()`, but to use it,
`_GNU_SOURCE` needs to be defined. This adds the flag in
meson.build to detect the function by meson correctly.
This commit is contained in:
Yu Watanabe 2017-12-25 19:42:42 +09:00 committed by Lennart Poettering
parent ebe6ff658d
commit 0e50bfaefd
1 changed files with 2 additions and 1 deletions

View File

@ -468,7 +468,8 @@ foreach ident : [
['kcmp', '''#include <linux/kcmp.h>'''],
['keyctl', '''#include <sys/types.h>
#include <keyutils.h>'''],
['copy_file_range', '''#include <sys/syscall.h>
['copy_file_range', '''#define _GNU_SOURCE
#include <sys/syscall.h>
#include <unistd.h>'''],
['bpf', '''#include <sys/syscall.h>
#include <unistd.h>'''],