Source: csh
Version: 20240808-1
Severity: serious
Tags: ftbfs patch
Justification: ftbfs

Hi Alastair,

The recently introduced patch fixing gcc 14 build failures also
introduced a type mismatch between seekf declaration and its
definition: the first with off64_t and the second with off_t.
On most architectures this is not a problem, as they share the
same size in the end, including on armel and armhf.  However,
the mismatch results in the following build failure on i386,
where off_t and off64_t have distinct sizes, as you can see in
the buildd log[1]:

        csh.c:1265:1: error: conflicting types for ‘seekf’; have ‘int(void *, 
off_t *, int)’ {aka ‘int(void *, long int *, int)’}
         1265 | seekf(void *oreo, off_t *off, int whence)
              | ^~~~~
        csh.c:158:17: note: previous declaration of ‘seekf’ with type ‘int(void 
*, off64_t *, int)’ {aka ‘int(void *, long long int *, int)’}
          158 | static int      seekf(void *, off64_t *, int);
              |                 ^~~~~

[1]: 
https://buildd.debian.org/status/fetch.php?pkg=csh&arch=i386&ver=20240808-1&stamp=1723122202&raw=0

I attached a patch that modifies the original g++-14.patch in
order to resolve the issue, for your convenience.  I did a few
manual tests to ensure the type change hasn't introduced any
obvious issues in the shell, not that there is a lot of room
left for error.

The build failure on i386 causes a sprawl of autoremoval
notifications in reverse dependencies, so if you're caught by
time, I'm considering the option of proceeding to an NMU.

Have a nice day,  :)
-- 
  .''`.  Étienne Mollier <emoll...@debian.org>
 : :' :  pgp: 8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
 `. `'   sent from /dev/pts/2, please excuse my verbosity
   `-
diff -Nru csh-20240808/debian/patches/g++-14.patch csh-20240808/debian/patches/g++-14.patch
--- csh-20240808/debian/patches/g++-14.patch	2024-08-08 13:02:13.000000000 +0200
+++ csh-20240808/debian/patches/g++-14.patch	2024-08-15 08:20:53.000000000 +0200
@@ -3,6 +3,7 @@
 Bug-Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1074892
 Last-Updated: 2024-08-08
 Forwarded: not-needed
+Reviewed-By: Étienne Mollier <emoll...@debian.org>
 
 --- a/csh.c
 +++ b/csh.c
@@ -22,7 +23,7 @@
 -static off_t
 -seekf(void *oreo, off_t off, int whence)
 +static int
-+seekf(void *oreo, off_t *off, int whence)
++seekf(void *oreo, off64_t *off, int whence)
  {
 -    return lseek(DESC(oreo), off, whence);
 +    return lseek(DESC(oreo), *off, whence);

Attachment: signature.asc
Description: PGP signature

Reply via email to