Bug#1065761: m4api: FTBFS on arm{el,hf}: /<>/m4api.c:413:10: error: implicit declaration of function ‘m4SetBinary’ [-Werror=implicit-function-declaration]
Package: m4api Followup-For: Bug #1065761 User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu noble ubuntu-patch Control: tags -1 patch Dear Maintainer, In Ubuntu, the attached patch was applied to fix the implicit declarations. * debian/patches: fix several implicit declarations (LP: #2060847) Thanks for considering the patch. -Nick diff -Nru m4api-0.3~0.9646fd/debian/patches/fix-several-implicit-declarations.patch m4api-0.3~0.9646fd/debian/patches/fix-several-implicit-declarations.patch --- m4api-0.3~0.9646fd/debian/patches/fix-several-implicit-declarations.patch 1969-12-31 19:00:00.0 -0500 +++ m4api-0.3~0.9646fd/debian/patches/fix-several-implicit-declarations.patch 2024-04-10 13:41:11.0 -0400 @@ -0,0 +1,27 @@ +Description: Fix several implicit declarations +Author: Nick Rosbrook +Bug-Ubuntu: https://bugs.launchpad.net/bugs/2060847 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066290 +Last-Update: 2024-04-10 +--- a/m4api.c b/m4api.c +@@ -391,6 +391,8 @@ + return 0; + } + ++int m4SetBinary(m4Handle *dev, struct m4ConfigField *field, char const *val); ++ + int m4SetFloat(m4Handle *dev, enum m4FieldID fid, float val) { + char binary[2]; + int ival; +--- a/m4ctl.c b/m4ctl.c +@@ -17,6 +17,8 @@ + */ + + #include ++#include ++#include + #include + + #include "m4api.h" diff -Nru m4api-0.3~0.9646fd/debian/patches/series m4api-0.3~0.9646fd/debian/patches/series --- m4api-0.3~0.9646fd/debian/patches/series1969-12-31 19:00:00.0 -0500 +++ m4api-0.3~0.9646fd/debian/patches/series2024-04-10 13:40:41.0 -0400 @@ -0,0 +1 @@ +fix-several-implicit-declarations.patch
Bug#1065761: m4api: FTBFS on arm{el,hf}: /<>/m4api.c:413:10: error: implicit declaration of function ‘m4SetBinary’ [-Werror=implicit-function-declaration]
Source: m4api Version: 0.3~0.9646fd-2.1 Severity: serious Tags: ftbfs Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: sramac...@debian.org https://buildd.debian.org/status/fetch.php?pkg=m4api=armel=0.3%7E0.9646fd-2.1=1709541630=0 [ 33%] Building C object CMakeFiles/m4api-static.dir/m4api.c.o /usr/bin/cc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MT CMakeFiles/m4api-static.dir/m4api.c.o -MF CMakeFiles/m4api-static.dir/m4api.c.o.d -o CMakeFiles/m4api-static.dir/m4api.c.o -c "/<>/m4api.c" /<>/m4api.c: In function ‘m4GetVal’: /<>/m4api.c:280:39: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 280 | printf("ERROR: typeLen(%d) == %lu!\n", type, m4TypeLengths[type]); | ~~^~~~ | | | | long unsigned int size_t {aka unsigned int} | %u /<>/m4api.c: In function ‘m4SetFloat’: /<>/m4api.c:413:10: error: implicit declaration of function ‘m4SetBinary’ [-Werror=implicit-function-declaration] 413 | return m4SetBinary(dev, field, binary); | ^~~ /<>/m4api.c: In function ‘m4GetVal’: /<>/m4api.c:280:39: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=] 280 | printf("ERROR: typeLen(%d) == %lu!\n", type, m4TypeLengths[type]); | ~~^~~~ | | | | long unsigned int size_t {aka unsigned int} | %u /<>/m4api.c: In function ‘m4SetFloat’: /<>/m4api.c:413:10: error: implicit declaration of function ‘m4SetBinary’ [-Werror=implicit-function-declaration] 413 | return m4SetBinary(dev, field, binary); | ^~~ cc1: some warnings being treated as errors make[3]: *** [CMakeFiles/m4api.dir/build.make:79: CMakeFiles/m4api.dir/m4api.c.o] Error 1 Cheers -- Sebastian Ramacher