[PATCH] libgloss: Fix invalid prototype

Paul Cercueil paul@crapouillou.net
Mon Jun 9 13:02:55 GMT 2025


The __inln prototype was defined as:

extern char * __inln ();

In old versions of C, this meant "this function takes an unspecified
number of parameters". This seems to have changed, as GCC 14 now
considers that the function took zero parameters.

As the code called it with one parameter, GCC would then issue an error
saying that the incorrect number of parameters was passed.

Address this issue by changing the prototype of the __inln function.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 libgloss/rs6000/mvme-read.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgloss/rs6000/mvme-read.c b/libgloss/rs6000/mvme-read.c
index 1c823b4..9d1e7d3 100644
--- a/libgloss/rs6000/mvme-read.c
+++ b/libgloss/rs6000/mvme-read.c
@@ -14,7 +14,7 @@
  */
 
 extern int inbyte ();
-extern char * __inln ();
+extern char * __inln (char *);
 
 /*
  * read  -- read bytes from the serial port. Ignore fd, since
-- 
2.47.2



More information about the Newlib mailing list