Control: tag -1 patch

On Wed, Jul 03, 2024 at 12:30:40PM +0000, Matthias Klose wrote:
> Package: src:ifeffit
> Version: 2:1.2.11d-12.5
> Severity: important
> Tags: sid trixie
> User: debian-...@lists.debian.org
> Usertags: ftbfs-gcc-14

> iff_shell.c: In function ‘main’:
> iff_shell.c:176:13: error: implicit declaration of function ‘execute_line’ 
> [-Wimplicit-function-declaration]
>   176 |       ret = execute_line(s);
>       |             ^~~~~~~~~~~~
> iff_shell.c: In function ‘com_cd’:
> iff_shell.c:256:7: error: implicit declaration of function ‘chdir’ 
> [-Wimplicit-function-declaration]
>   256 |   if (chdir (arg) == -1) { return 1;  }
>       |       ^~~~~
> iff_shell.c: In function ‘com_pwd’:
> iff_shell.c:262:7: error: implicit declaration of function ‘getcwd’; did you 
> mean ‘getw’? [-Wimplicit-function-declaration]

Proposed patch attached. The package builds for me with this.

I didn't test the resulting binaries and I didn't notice any kind of a
test suite, but I don't see much chance for regression with this.

Hope this helps,
-- 
Niko Tyni   nt...@debian.org
From: Niko Tyni <nt...@debian.org>
Date: Mon, 5 Aug 2024 08:18:07 +0100
X-Dgit-Generated: 2:1.2.11d-12.5 659b62a1a0b4cec9cccf99973ab7ddb194fad6ac
Subject: Add missing prototypes to placate GCC 14

unistd.h is for getcwd() and chdir()

Bug-Debian: https://bugs.debian.org/1075085

---

diff --git a/src/cmdline/iff_shell.c b/src/cmdline/iff_shell.c
index 9c0bd86..bd2fca8 100755
--- a/src/cmdline/iff_shell.c
+++ b/src/cmdline/iff_shell.c
@@ -44,6 +44,10 @@
 #include <strings.h>
 #endif
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #ifdef MY_READLINE
 #  include "../../readline/readline.h"
 #  include "../../readline/history.h"
@@ -65,6 +69,7 @@ int   iff_load_file(), write_history_file();
 char  *stripwhite(), *progname, *home;
 static char comstr[1024], line_ex[1024], hist_file[512];
 void   initialize_readline();
+int execute_line (char *line);
 
 #include "../lib/ifeffit.h"
 #include "commands.h"

Reply via email to