Skip to content
Snippets Groups Projects
Commit 04014f8d authored by Simon McVittie's avatar Simon McVittie
Browse files

Give libglnx subproject its own config.h

parent 9932e111
No related branches found
No related tags found
No related merge requests found
#define _GNU_SOURCE
#define G_LOG_DOMAIN "pressure-vessel"
#mesondefine HAVE_DECL_COPY_FILE_RANGE
#mesondefine HAVE_DECL_MEMFD_CREATE
#mesondefine HAVE_DECL_RENAMEAT2
#mesondefine VERSION
......@@ -167,34 +167,6 @@ cc = meson.get_compiler('c')
conf_data = configuration_data()
conf_data.set('VERSION', version)
check_functions = [
'renameat2',
'memfd_create',
'copy_file_range',
]
foreach check_function : check_functions
if cc.compiles('''
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/mount.h>
#include <fcntl.h>
#include <sched.h>
#include <linux/loop.h>
#include <linux/random.h>
#include <sys/mman.h>
int func (void) {
(void) ''' + check_function + ''';
}
''',
args : '-D_GNU_SOURCE',
name : check_function + '() is declared',
)
conf_data.set('HAVE_DECL_' + check_function.underscorify().to_upper(), 1)
endif
endforeach
configure_file(
input : 'config.h.in',
output : 'config.h',
......
......@@ -19,6 +19,7 @@
*/
#include "config.h"
#include "subprojects/libglnx/config.h"
#include <string.h>
#include <fcntl.h>
......
......@@ -21,6 +21,7 @@
*/
#include "config.h"
#include "subprojects/libglnx/config.h"
#include "flatpak-utils-private.h"
......
......@@ -23,6 +23,7 @@
*/
#include "config.h"
#include "subprojects/libglnx/config.h"
#include <glib.h>
#include <glib/gstdio.h>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment