chiark / gitweb /
meson: define _GNU_SOURCE to detect copy_file_range() (#7734)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 25 Dec 2017 10:42:42 +0000 (19:42 +0900)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:49:41 +0000 (07:49 +0200)
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.

meson.build

index 2501fe5cca53fecb56daef09003e38868936fcbc..c9ce60a97b5af0266a02845c966708f2f10542b0 100644 (file)
@@ -532,7 +532,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>'''],