[Pkg-ayatana-devel] Bug#1067203: user-session-migration: fix ftbfs on architectures affected by t64 transition
Michael Hudson-Doyle
michael.hudson at ubuntu.com
Tue Mar 19 23:45:52 GMT 2024
Package: user-session-migration
Severity: serious
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
X-Debbugs-Cc: michael.hudson at ubuntu.com
Dear Maintainer,
In Ubuntu, the attached patch was applied to achieve the following:
* Do not use "%ld" specifier to print time_t timestamp.
This fixes a test failure (and misbehaviour) on systems where time_t is
64-bit and long is 32-bit.
Thanks for considering the patch.
-- System Information:
Debian Release: trixie/sid
APT prefers mantic-updates
APT policy: (500, 'mantic-updates'), (500, 'mantic-security'), (500, 'mantic'), (100, 'mantic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.5.0-25-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_NZ.UTF-8:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru user-session-migration-0.4.1ubuntu1/src/user-session-migration.c user-session-migration-0.4.1ubuntu2/src/user-session-migration.c
--- user-session-migration-0.4.1ubuntu1/src/user-session-migration.c 2023-04-10 06:06:15.000000000 +1200
+++ user-session-migration-0.4.1ubuntu2/src/user-session-migration.c 2024-03-20 12:29:27.000000000 +1300
@@ -277,7 +277,7 @@
filename = get_migration_filename();
keyfile = g_key_file_new ();
- str = g_strdup_printf ("%ld", time (NULL));
+ str = g_strdup_printf ("%lld", (long long)time (NULL));
g_key_file_set_string (keyfile,
"State", "timestamp", str);
g_free (str);
More information about the Pkg-ayatana-devel
mailing list