From: Fred Morcos Date: Sat, 17 Jun 2023 09:18:49 +0000 (+0200) Subject: Meson: Check for sys/mman.h and mmap X-Git-Tag: rec-5.1.0-alpha1~80^2~390 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b15e7b6edd1f5329a3a501ee7fb47ee78cbda77;p=thirdparty%2Fpdns.git Meson: Check for sys/mman.h and mmap --- diff --git a/meson.build b/meson.build index 6897b4d264..2cf18d431f 100644 --- a/meson.build +++ b/meson.build @@ -417,6 +417,19 @@ if has endif summary('tm_gmtoff', has, bool_yn: true, section: 'System') +# Check for mmap ------------------------------------------------------------------------- +mman_h = false +have_mmap = false +if cxx.has_header('sys/mman.h', required: false) + mman_h = true + if cxx.has_function('mmap', prefix: '''#include ''') + have_mmap = true + conf.set('HAVE_MMAP', 1, description: 'Whether we have mmap') + endif +endif +summary('sys/mman.h', mman_h, bool_yn: true, section: 'System') +summary('Have mmap', have_mmap, bool_yn: true, section: 'System') + # Generate config.h ---------------------------------------------------------------------- config_h = configure_file(configuration: conf, output: 'config.h') # summary('Defines', conf.keys(), section: 'Build Configuration') # Meson 0.57