Bug#1067623: FTBFS: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘__time64_t’ {aka ‘long long int’}
Control: tags -1 + pending I have NMU'd this package fixing this bug with Steve's patch - Thanks Steve! I have uploaded this to DELAYED/2 - please let me know if I should delay it further. Debdiff attached. best /Andreas Rönnquist gus...@debian.org acm_time_t64.debdiff Description: Binary data
Bug#1067623: FTBFS: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘__time64_t’ {aka ‘long long int’}
Package: acm Followup-For: Bug #1067623 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu noble ubuntu-patch Control: tags -1 patch Please find attached a patch for this issue which has been uploaded to Ubuntu. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer https://www.debian.org/ slanga...@ubuntu.com vor...@debian.org diff -Nru acm-6.0+20200416/debian/patches/64-bit-time-t.patch acm-6.0+20200416/debian/patches/64-bit-time-t.patch --- acm-6.0+20200416/debian/patches/64-bit-time-t.patch 1969-12-31 16:00:00.0 -0800 +++ acm-6.0+20200416/debian/patches/64-bit-time-t.patch 2024-04-12 17:30:16.0 -0700 @@ -0,0 +1,22 @@ +Description: use 64-bit-safe format string for time_t +Author: Steve Langasek +Bug-Debian: https://bugs.debian.org/1067623 +Last-Update: 2024-04-12 +Forwarded: no + +Index: acm-6.0+20200416/src/dis/test/disscope.c +=== +--- acm-6.0+20200416.orig/src/dis/test/disscope.c acm-6.0+20200416/src/dis/test/disscope.c +@@ -239,8 +239,9 @@ + printf ("Family %d\n", pdu.hdr.protocol_family); + printf ("Exercise id %d\n", pdu.hdr.exercise_id); + dis_timestampToTimeval (_stamp, ); +- printf ("Time stamp %ld.%ld\n", tm.tv_sec, +- tm.tv_usec / 1000); ++ printf ("Time stamp %lld.%lld\n", ++ (long long int)tm.tv_sec, ++ (long long int)tm.tv_usec / 1000); + switch (pdu.hdr.pdu_type) { + case PDUTypeEntityState: + printf ("Entity (sim.app.eid) : %d/%d/%d\n", diff -Nru acm-6.0+20200416/debian/patches/series acm-6.0+20200416/debian/patches/series --- acm-6.0+20200416/debian/patches/series 2022-10-17 08:51:57.0 -0700 +++ acm-6.0+20200416/debian/patches/series 2024-04-12 17:28:43.0 -0700 @@ -4,3 +4,4 @@ fix_paths_in_acm_tcl.patch hardening1.patch fix_buffer_size.patch +64-bit-time-t.patch
Bug#1067623: FTBFS: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘__time64_t’ {aka ‘long long int’}
Source: acm Version: 6.0+20200416-1.1 Severity: serious Tags: ftbfs https://buildd.debian.org/status/fetch.php?pkg=acm=armel=6.0%2B20200416-1.1%2Bb2=1711183805=0 disscope.c: In function ‘main’: disscope.c:242:45: error: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘__time64_t’ {aka ‘long long int’} [-Werror=format=] 242 | printf ("Time stamp %ld.%ld\n", tm.tv_sec, Note that the package enables -Werror. -- System Information: Debian Release: trixie/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'testing'), (101, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.7.9-amd64 (SMP w/4 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled