Package: keepalived Version: 1:2.3.1-1 Severity: normal Tags: patch ftbfs X-Debbugs-Cc: athos.ribe...@canonical.com User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu oracular ubuntu-patch
Dear Maintainer, In Ubuntu, the attached patch was applied to achieve the following: keepalived FTBFS due to an incompatible pointer type [-Wincompatible-pointer-types] issue when compiling keepalived with GCC 14 [1] in 32-bit architectures where time_t size is 64 bits. [1] https://gcc.gnu.org/gcc-14/porting_to.html The issue was found when compiling keepalived in Ubuntu 24.10 for armhf with gcc 14 (https://launchpadlibrarian.net/749244069/buildlog_ubuntu-oracular-armhf.keepalived_1%3A2.3.1-1_BUILDING.txt.gz) * d/p/fix-armhf-ftbfs.patch: fix -Wincompatible-pointer-types issue in armhf which leads to a FTBFS failure due to time_t size. (LP: #2082514) Thanks for considering the patch.
diff -Nru keepalived-2.3.1/debian/patches/fix-armhf-ftbfs.patch keepalived-2.3.1/debian/patches/fix-armhf-ftbfs.patch --- keepalived-2.3.1/debian/patches/fix-armhf-ftbfs.patch 1969-12-31 21:00:00.000000000 -0300 +++ keepalived-2.3.1/debian/patches/fix-armhf-ftbfs.patch 2024-09-26 11:43:50.000000000 -0300 @@ -0,0 +1,31 @@ +From ef1df4972695f2a37bd540063916d5ae45f7f7ff Mon Sep 17 00:00:00 2001 +From: Athos Ribeiro <athos.ribe...@canonical.com> +Date: Thu, 26 Sep 2024 11:16:15 -0300 +Subject: [PATCH] bfd: use time_t to avoid implicit ptr type casting + +This fixes an incompatible pointer type [-Wincompatible-pointer-types] +issue when compiling keepalived with GCC 14 [1] in 32-bit architectures +where time_t size is 64 bits. + +[1] https://gcc.gnu.org/gcc-14/porting_to.html + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/keepalived/+bug/2082514 +Forwarded: https://github.com/acassen/keepalived/pull/2471 +Last-Update: 2024-09-26 +--- + keepalived/bfd/bfd_data.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/keepalived/bfd/bfd_data.c b/keepalived/bfd/bfd_data.c +index 688e2f629c..bd717d50f8 100644 +--- a/keepalived/bfd/bfd_data.c ++++ b/keepalived/bfd/bfd_data.c +@@ -110,7 +110,7 @@ static void + conf_write_sands(FILE *fp, const char *text, unsigned long sands) + { + char time_str[26]; +- long secs; ++ time_t secs; + + if (sands == TIMER_NEVER) { + conf_write(fp, " %s = [disabled]", text); diff -Nru keepalived-2.3.1/debian/patches/series keepalived-2.3.1/debian/patches/series --- keepalived-2.3.1/debian/patches/series 2024-05-28 16:57:05.000000000 -0300 +++ keepalived-2.3.1/debian/patches/series 2024-09-26 11:43:50.000000000 -0300 @@ -1 +1,2 @@ 0002-build-make-build-reproducible-by-not-displaying-ffil.patch +fix-armhf-ftbfs.patch