|
|
9f65a5f |
From fe440cf5f4c9a177e025dda870ace8f093f6632b Mon Sep 17 00:00:00 2001
|
|
|
9f65a5f |
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
9f65a5f |
Date: Mon, 9 Jul 2018 12:34:14 +0200
|
|
|
9f65a5f |
Subject: [PATCH] build: check for renameat2()/copy_file_range() with
|
|
|
9f65a5f |
_GNU_SOURCE
|
|
|
9f65a5f |
|
|
|
9f65a5f |
The config.h which we generate doesn't apply for checks and those
|
|
|
9f65a5f |
functions are available only when _GNU_SOURCE is defined.
|
|
|
9f65a5f |
|
|
|
9f65a5f |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1599252
|
|
|
9f65a5f |
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
9f65a5f |
---
|
|
|
9f65a5f |
meson.build | 6 ++++--
|
|
|
9f65a5f |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
9f65a5f |
|
|
|
9f65a5f |
diff --git a/meson.build b/meson.build
|
|
|
9f65a5f |
index f42ed16..9dd3ba0 100644
|
|
|
9f65a5f |
--- a/meson.build
|
|
|
9f65a5f |
+++ b/meson.build
|
|
|
9f65a5f |
@@ -74,8 +74,10 @@ conf.set('SIZEOF_UID_T', cc.sizeof('uid_t', prefix : '#include <sys/types.h>'))
|
|
|
9f65a5f |
conf.set('SIZEOF_GID_T', cc.sizeof('gid_t', prefix : '#include <sys/types.h>'))
|
|
|
9f65a5f |
|
|
|
9f65a5f |
foreach ident : [
|
|
|
9f65a5f |
- ['renameat2', '''#include <stdio.h>'''],
|
|
|
9f65a5f |
- ['copy_file_range', '''#include <sys/syscall.h>
|
|
|
9f65a5f |
+ ['renameat2', '''#define _GNU_SOURCE
|
|
|
9f65a5f |
+ #include <stdio.h>'''],
|
|
|
9f65a5f |
+ ['copy_file_range', '''#define _GNU_SOURCE
|
|
|
9f65a5f |
+ #include <sys/syscall.h>
|
|
|
9f65a5f |
#include <unistd.h>'''],
|
|
|
9f65a5f |
]
|
|
|
9f65a5f |
have = cc.has_function(ident[0], prefix : ident[1])
|
|
|
9f65a5f |
--
|
|
|
9f65a5f |
2.18.0.rc2
|
|
|
9f65a5f |
|