From e1b0a094c6fdd2bdd98f5cd06cc48a236b8ef5b6 Mon Sep 17 00:00:00 2001 From: Jordan Williams Date: Wed, 17 Apr 2024 11:56:09 -0500 Subject: [PATCH] meson: Require the seminfo type for ipcmk, ipcrm, and ipcs Signed-off-by: Jordan Williams (cherry picked from commit 023950b1b623e6c3598d244a5569eeb0d5141237) --- meson.build | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 724d580c4..8d92e58b4 100644 --- a/meson.build +++ b/meson.build @@ -1376,7 +1376,9 @@ exe = executable( exes += exe manadocs += ['sys-utils/choom.1.adoc'] -opt = get_option('build-ipcmk').allowed() +has_seminfo_type = cc.has_type('struct seminfo', args : '-D_GNU_SOURCE', prefix : '#include ') + +opt = get_option('build-ipcmk').require(has_seminfo_type).allowed() exe = executable( 'ipcmk', ipcmk_sources, @@ -1391,7 +1393,7 @@ if opt and not is_disabler(exe) bashcompletions += ['ipcmk'] endif -opt = get_option('build-ipcrm').allowed() +opt = get_option('build-ipcrm').require(has_seminfo_type).allowed() exe = executable( 'ipcrm', ipcrm_sources, @@ -1406,7 +1408,7 @@ if opt and not is_disabler(exe) bashcompletions += ['ipcrm'] endif -opt = not get_option('build-ipcs').disabled() +opt = not get_option('build-ipcs').require(has_seminfo_type).disabled() exe = executable( 'ipcs', ipcs_sources, -- 2.47.3