Your message dated Sun, 26 Jul 2026 15:51:05 +0000
with message-id <[email protected]>
and subject line Bug#1142807: fixed in pgstat 1.4.0-3
has caused the Debian Bug report #1142807,
regarding pgstat: FTBFS on hurd-amd64: getopt/optind undeclared
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
1142807: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1142807
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: pgstat
Version: 1.4.0-2
Severity: important
Tags: patch, ftbfs
User: [email protected]
Usertags: hurd-amd64
X-Debbugs-Cc: [email protected]
pgstat fails to build from source on hurd-amd64 because pgstat.c uses
getopt() and optind without including the POSIX header that declares them.
The relevant compiler errors are:
pgstat.c:601:15: error: implicit declaration of function ‘getopt’
pgstat.c:776:7: error: ‘optind’ undeclared
pgstat.c only includes <sys/ioctl.h> before the PostgreSQL frontend
headers. On GNU/Hurd the POSIX getopt/optind declarations are not
transitively pulled in, so they are undeclared.
Upstream has already fixed this by including <unistd.h>:
https://github.com/gleu/pgstats/commit/4cab84a976865614aa3d14306f97398f40289f38
Please cherry-pick the pgstat.c part of that upstream commit. The minimal
backport is included below.
I verified the backport on native GNU/Hurd amd64 running Debian sid:
dpkg-buildpackage exited 0, autopkgtest exited 0, and its pgstat test
passed.
Toolchain stamp:
- gnumach 1.8+git20260224-up-amd64
- hurd 1:0.9.git20260527-3+b1
- libc0.3 2.42-17
- binutils 2.46.90.20260712-1
- gcc 4:15.2.0-5+b1
--- pgstat-unistd.patch ---
Description: Include <unistd.h> for getopt on GNU/Hurd
Origin: upstream,
https://github.com/gleu/pgstats/commit/4cab84a976865614aa3d14306f97398f40289f38
Applied-Upstream: commit:4cab84a976865614aa3d14306f97398f40289f38
Last-Update: 2026-07-26
--- a/pgstat.c
+++ b/pgstat.c
@@ -14,6 +14,7 @@
* System headers
*/
#include <sys/ioctl.h>
+#include <unistd.h>
/*
Assisted-by: hurd-collab agent (automated portability triage/fix)
Signed-off-by: Federico Bonino <[email protected]>
--- End Message ---
--- Begin Message ---
Source: pgstat
Source-Version: 1.4.0-3
Done: Michael Banck <[email protected]>
We believe that the bug you reported is fixed in the latest version of
pgstat, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Michael Banck <[email protected]> (supplier of updated pgstat package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 26 Jul 2026 17:26:50 +0200
Source: pgstat
Architecture: source
Version: 1.4.0-3
Distribution: unstable
Urgency: medium
Maintainer: Debian PostgreSQL Maintainers <[email protected]>
Changed-By: Michael Banck <[email protected]>
Closes: 1142807
Changes:
pgstat (1.4.0-3) unstable; urgency=medium
.
* Team upload.
* Include FTBFS fix for hurd-amd64, by Federico Bonino. (Closes: #1142807)
Checksums-Sha1:
f0239ade1e84003b856f4bdfcabf78757b52a3f5 1993 pgstat_1.4.0-3.dsc
2584b01508cb4979b66c5d985c7717a541432796 3356 pgstat_1.4.0-3.debian.tar.xz
d9bc633511346d486443a5f9629ff5c875a5e9a6 7830 pgstat_1.4.0-3_source.buildinfo
Checksums-Sha256:
85caa11473a70aedf4d68b909f3452b0a162635ed052cf02aebb08057c3fd901 1993
pgstat_1.4.0-3.dsc
c96d13887f6bc8bc06bb16bec2e285783468dcf6577ddf7104d00a83c1a1eb78 3356
pgstat_1.4.0-3.debian.tar.xz
b4b18d6282612e06a7aba710de22c000973d20a11dd4b6cb0718145e28edbd57 7830
pgstat_1.4.0-3_source.buildinfo
Files:
44e066c00dffb5380faa3947abbbb79d 1993 database optional pgstat_1.4.0-3.dsc
72ec23e0b0d712759df9288965c7318b 3356 database optional
pgstat_1.4.0-3.debian.tar.xz
950af764c5f5a5ed7ef6927f4b1263b7 7830 database optional
pgstat_1.4.0-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEnKh3dJ+rLk+paGLs3GhqJ7Q0gbAFAmpmKAYACgkQ3GhqJ7Q0
gbCwuQ//WMcIdxctK6wlmecVr+HoFoCP044LhUjalxDSfUEHnymiaYrT2LXXbtAd
izBDA1Ss9t3xOl7KZJOeuFcQzWCS+IAkZSTlBvNIZpcYmpzAE/v42J42g/J5C392
G2pxwtJBsmaJCpJxyzQ0kZYd59q7woE9STOzECsn6+NtTIvLTxH+ZeZB4pca018H
rIFUyOnQqJ/0XbTOqbJBwYsaLSxKZWX0neWHAIXbTe6ORXQK/UAhCGPhJ5Q7BD7O
N6RLd92HZJewUhzaguE3tpMpuOa2rYBhtLYIOqfVVDfk0eJ5pY848X9GzJL7GeJZ
I7bJgBY2nLVUEIfu4fZUD+98tMFiJ00CrvYHinDTxk0GWST6AxL12/ki2YCZLLpt
4yCJoOEVE0ven5xtJhTdBI5qa8kK60fK1twJUPYUTdLn89Vnvz+RFekwG64mEoXs
q5+Um2NMHb/EiNZZybdhXZNHZ3QBOjp59V160cnMt5XGp98uyn8Lz56SO0ILQ8uQ
cpKiEpZO4d18qUyqHjLBZ7Nq09qj3ZDrwL2kYjW/qxVR9xY+jlwYQ0sQoq3pv9FX
65PDBB7ZtXRZvylvkk4USoLBMQ7GRLfs+mXAZLuV4fT7NJiapcRYpl5f1gh4g8BR
xAAxCHsB4W8rda8pANGcpfDNWCWT7nhN+x89wXDV7XipZePJd00=
=Dz8i
-----END PGP SIGNATURE-----
pgpy6ByX4KGsn.pgp
Description: PGP signature
--- End Message ---