GNU bug report logs -
#77724
[PATCH] maint: include errno.h
Previous Next
To reply to this bug, email your comments to 77724 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gzip <at> gnu.org
:
bug#77724
; Package
gzip
.
(Fri, 11 Apr 2025 07:01:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andreas Stieger <Andreas.Stieger <at> gmx.de>
:
New bug report received and forwarded. Copy sent to
bug-gzip <at> gnu.org
.
(Fri, 11 Apr 2025 07:01:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Found building for s390x on openSUSE
---
dfltcc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dfltcc.c b/dfltcc.c
index 9f86581..7333757 100644
--- a/dfltcc.c
+++ b/dfltcc.c
@@ -18,6 +18,7 @@
#include <config.h>
#include <stdlib.h>
+#include <errno.h>
#ifdef HAVE_SYS_SDT_H
# include <sys/sdt.h>
--
2.49.0
Information forwarded
to
bug-gzip <at> gnu.org
:
bug#77724
; Package
gzip
.
(Fri, 11 Apr 2025 07:15:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 77724 <at> debbugs.gnu.org (full text, mbox):
On 2025-04-10 22:27, Andreas Stieger via GNU gzip discussion and bug
reports. wrote:
> Found building for s390x on openSUSE
> ---
> dfltcc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/dfltcc.c b/dfltcc.c
> index 9f86581..7333757 100644
> --- a/dfltcc.c
> +++ b/dfltcc.c
> @@ -18,6 +18,7 @@
> #include <config.h>
> #include <stdlib.h>
> +#include <errno.h>
> #ifdef HAVE_SYS_SDT_H
> # include <sys/sdt.h>
Why is this needed? What happens if you omit "#include <errno.h>".
The line numbers don't seem to match the current gzip source code; could
you please try the latest gzip?
Information forwarded
to
bug-gzip <at> gnu.org
:
bug#77724
; Package
gzip
.
(Fri, 11 Apr 2025 12:42:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 77724 <at> debbugs.gnu.org (full text, mbox):
On 2025-04-11 09:14, Paul Eggert wrote:
> Why is this needed? What happens if you omit "#include <errno.h>".
Sure no problem. Without this patch, on (our) s390x build (only):
[ 443s] gcc -DHAVE_CONFIG_H -I. -I./lib -I./lib -O2 -Wall
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong
-funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection
-Werror=return-type -flto=auto -g -fomit-frame-pointer
-Dalignas=_Alignas -W -Wall -Wno-unused-parameter -Wstrict-prototypes
-Wpointer-arith -fPIE -DDFLTCC_LEVEL_MASK=0x7e -fprofile-generate -c -o
dfltcc.o dfltcc.c
[ 443s] dfltcc.c: In function 'dfltcc_inflate':
[ 443s] dfltcc.c:441:15: error: 'errno' undeclared (first use in this
function)
[ 443s] 441 | errno = 0;
[ 443s] | ^~~~~
[ 443s] dfltcc.c:28:1: note: 'errno' is defined in header '<errno.h>';
this is probably fixable by adding '#include <errno.h>'
[ 443s] 27 | #include "gzip.h"
[ 443s] +++ |+#include <errno.h>
[ 443s] 28 |
[ 443s] dfltcc.c:441:15: note: each undeclared identifier is reported
only once for each function it appears in
[ 443s] 441 | errno = 0;
[ 443s] | ^~~~~
[ 443s] make[2]: *** [Makefile:2050: dfltcc.o] Error 1
I did not dive into the why because the fix seems obvious. Looks like
this fixes: 23ddd95
<https://github.com/andreasstieger/gzip/commit/23ddd95f3e152423fe0dfc96ff31d4130a65e8cf>
"gzip: better fix for s390 buffer flushes"
Full log and config at:
https://build.opensuse.org/package/show/home:AndreasStieger/gzip-broken
https://build.opensuse.org/package/live_build_log/home:AndreasStieger/gzip-broken/openSUSE_Tumbleweed/s390x
> The line numbers don't seem to match the current gzip source code;
> could you please try the latest gzip?
Hmm, this is literally off your master at a6924a2a2, v.1.14 + 1. I put
60f9518 into the errno branch at
https://github.com/andreasstieger/gzip/compare/master...errno
Andreas
This bug report was last modified 69 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.