]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: add hwclock-gplv3 option
authorKarel Zak <kzak@redhat.com>
Thu, 19 Mar 2026 12:44:16 +0000 (13:44 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 24 Mar 2026 09:21:15 +0000 (10:21 +0100)
Add the missing hwclock-gplv3 option (default: true) to match
autotools --disable-hwclock-gplv3. Without the USE_HWCLOCK_GPLv3_DATETIME
define, meson builds used the minimalistic GPLv2 date parser even though
the GPLv3 parse-date.y was always compiled and linked.

Signed-off-by: Karel Zak <kzak@redhat.com>
meson.build
meson_options.txt

index 38bee513337bd570ead04605611a890fce1b3913..2e12cef614c5c04f779b36b60a1a1f41774674a6 100644 (file)
@@ -916,6 +916,9 @@ use_hwclock_cmos = host_machine.cpu_family() in ['x86', 'x86_64']
 message('Use CMOS clock: @0@'.format(use_hwclock_cmos))
 conf.set('USE_HWCLOCK_CMOS', use_hwclock_cmos ? 1 : false)
 
+use_hwclock_gplv3 = get_option('hwclock-gplv3')
+conf.set('USE_HWCLOCK_GPLv3_DATETIME', use_hwclock_gplv3 ? 1 : false)
+
 conf.set('HAVE_TLS', get_option('use-tls') ? 1 : false)
 conf.set('PG_BELL', get_option('pg-bell') ? 1 : false)
 conf.set('USE_COLORS_BY_DEFAULT', get_option('colors-default') ? 1 : false)
index cd866661ac32ae4b8da039e5e2921b9157d0db16..d90a4b99dd1445ec86241c186ca0befaf75b036f 100644 (file)
@@ -328,6 +328,9 @@ option('login-lastlogin', type : 'boolean',
 option('login-stat-mail', type : 'boolean',
        value : false,
        description : 'let login stat() the mailbox')
+option('hwclock-gplv3', type : 'boolean',
+       value : true,
+       description : 'use datetime parsing GPLv3 code for hwclock')
 
 option('tty-setgid', type : 'boolean',
        value : true,