]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: move sys/klog.h check into generic header checks
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 29 Apr 2026 12:12:31 +0000 (14:12 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Mon, 4 May 2026 13:52:04 +0000 (15:52 +0200)
The check will be reused for different tools.

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

index 48e959dfa87a9b1147adef4c1edde512c7cd871f..5cb29c7c39bc2a2f7e10a27005f2cf183341e6c0 100644 (file)
@@ -146,6 +146,7 @@ headers = '''
         sys/io.h
         sys/ioccom.h
         sys/ioctl.h
+        sys/klog.h
         sys/mkdev.h
         sys/mman.h
         sys/mount.h
@@ -1661,7 +1662,9 @@ if opt and not is_disabler(exe)
   bashcompletions += ['fstrim']
 endif
 
-opt = get_option('build-dmesg').require(cc.has_header('sys/klog.h')).allowed()
+opt = get_option('build-dmesg') \
+     .require(conf.get('HAVE_SYS_KLOG_H').to_string() == '1') \
+     .allowed()
 exe = executable(
   'dmesg',
   dmesg_sources,