]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: gate partx on linux/blkpg.h
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Apr 2026 12:11:22 +0000 (14:11 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 4 May 2026 13:52:04 +0000 (15:52 +0200)
The target needs this header, encode this in the build system.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
meson.build

index 99d713cf220930e765acf271937571012be4e3e1..e815a3739ad8ef25bebeed2c02fa6b988d759494 100644 (file)
@@ -107,6 +107,7 @@ headers = '''
         utmp.h
         utmpx.h
         asm/io.h
+        linux/blkpg.h
         linux/blkzoned.h
         linux/capability.h
         linux/cdrom.h
@@ -2578,7 +2579,9 @@ if opt and not is_disabler(exe)
   bashcompletions += ['cfdisk']
 endif
 
-opt = get_option('build-partx').allowed()
+opt = get_option('build-partx') \
+      .require(conf.get('HAVE_LINUX_BLKPG_H').to_string() == '1') \
+      .allowed()
 exe = executable(
   'addpart',
   addpart_sources,