aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Williams <jordan@jwillikers.com>2024-04-17 11:56:09 -0500
committerJordan Williams <jordan@jwillikers.com>2024-04-17 11:56:09 -0500
commit023950b1b623e6c3598d244a5569eeb0d5141237 (patch)
tree1e1b118ac6d777f39b910392c24bcbf4ae40fefe
parent0b91fd9f45bbdb0ed792f2535b8b95b965e8a176 (diff)
downloadutil-linux-023950b1b623e6c3598d244a5569eeb0d5141237.tar.gz
meson: Require the seminfo type for ipcmk, ipcrm, and ipcs
Signed-off-by: Jordan Williams <jordan@jwillikers.com>
-rw-r--r--meson.build8
1 files changed, 5 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index c0300a64fe..19f11c6d43 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 <sys/sem.h>')
+
+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,