From 023950b1b623e6c3598d244a5569eeb0d5141237 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 --- meson.build | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index c0300a64f..19f11c6d4 100644 --- a/meson.build +++ b/meson.build @@ -1387,7 +1387,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, @@ -1402,7 +1404,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, @@ -1417,7 +1419,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