Bug#1066281: libdbi-drivers: FTBFS: src/unit.c:229:5: error: implicit declaration of function ‘wait’; did you mean ‘want’? [-Werror=implicit-function-declaration]

2024-03-17 Thread Steve Langasek
Package: libdbi-drivers
Version: 0.9.0-11
Followup-For: Bug #1066281
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu noble ubuntu-patch
Control: tags -1 patch

Please find attached a (trivial) patch for this issue.

-- 
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 libdbi-drivers-0.9.0/debian/control 
libdbi-drivers-0.9.0/debian/control
--- libdbi-drivers-0.9.0/debian/control 2023-01-18 07:10:49.0 -0800
+++ libdbi-drivers-0.9.0/debian/control 2024-03-17 11:28:49.0 -0700
@@ -1,8 +1,7 @@
 Source: libdbi-drivers
 Section: libs
 Priority: optional
-Maintainer: Ubuntu Developers 
-XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) 
+Maintainer: Laszlo Boszormenyi (GCS) 
 Uploaders: Prach Pongpanich 
 Build-Depends: automake,
debhelper-compat (= 12),
diff -Nru libdbi-drivers-0.9.0/debian/patches/no-implicit-declarations.patch 
libdbi-drivers-0.9.0/debian/patches/no-implicit-declarations.patch
--- libdbi-drivers-0.9.0/debian/patches/no-implicit-declarations.patch  
1969-12-31 16:00:00.0 -0800
+++ libdbi-drivers-0.9.0/debian/patches/no-implicit-declarations.patch  
2024-03-17 11:28:43.0 -0700
@@ -0,0 +1,20 @@
+Description: fix implicit declaration error for wait()
+ 64-bit time_t requires us to be stricter about function declarations.
+ include the missing system header that defines wait().
+Author: Steve Langasek 
+Bug-Debian: https://bugs.debian.org/1066281
+Forwarded: no
+Last-Update: 2024-03-17
+
+Index: libdbi-drivers-0.9.0/tests/cgreen/src/unit.c
+===
+--- libdbi-drivers-0.9.0.orig/tests/cgreen/src/unit.c
 libdbi-drivers-0.9.0/tests/cgreen/src/unit.c
+@@ -9,6 +9,7 @@
+ #include 
+ #include 
+ #include 
++#include 
+ 
+ enum {test_function, test_suite};
+ 
diff -Nru libdbi-drivers-0.9.0/debian/patches/series 
libdbi-drivers-0.9.0/debian/patches/series
--- libdbi-drivers-0.9.0/debian/patches/series  2023-01-18 07:10:47.0 
-0800
+++ libdbi-drivers-0.9.0/debian/patches/series  2024-03-17 11:26:21.0 
-0700
@@ -10,3 +10,4 @@
 test_mysql_date_tz.patch
 mysql-8.0.patch
 no_mariadb_timezone.patch
+no-implicit-declarations.patch


Bug#1066281: libdbi-drivers: FTBFS: src/unit.c:229:5: error: implicit declaration of function ‘wait’; did you mean ‘want’? [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: libdbi-drivers
Version: 0.9.0-11
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

This is most likely caused by a change in dpkg 1.22.6, that enabled
-Werror=implicit-function-declaration. For more information, see
https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration

Relevant part (hopefully):
> x86_64-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -Iinclude  -Wdate-time 
> -D_FORTIFY_SOURCE=2  -std=gnu99 -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -g 
> -Wall -MT unit.o -MD -MP -MF .deps/unit.Tpo -c -o unit.o `test -f 
> 'src/unit.c' || echo './'`src/unit.c
> src/unit.c: In function ‘wait_for_child_process’:
> src/unit.c:229:5: error: implicit declaration of function ‘wait’; did you 
> mean ‘want’? [-Werror=implicit-function-declaration]
>   229 | wait(&status);
>   | ^~~~
>   | want
> src/unit.c: At top level:
> src/unit.c:254:13: warning: ‘tally_counter’ defined but not used 
> [-Wunused-function]
>   254 | static void tally_counter(const char *file, int line, int expected, 
> int actual, void *abstract_reporter) {
>   | ^
> cc1: some warnings being treated as errors
> make[4]: *** [Makefile:457: unit.o] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/libdbi-drivers_0.9.0-11_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lu...@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.