mirror of
https://git.yoctoproject.org/poky
synced 2026-01-29 21:08:42 +01:00
expect: Fix implicit-function-declaration warnings
(From OE-Core rev: 06ca0b74e5856890a55be15b5061280cbab43d79) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
From 904c7cf6647594939ce1e398468bca3c885f0622 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 15 Aug 2022 18:25:23 -0700
|
||||
Subject: [PATCH] Add prototype to function definitions
|
||||
|
||||
Compilers like clang has started erroring out on implicit-function-declaration
|
||||
therefore arrange the relevant include files where needed.
|
||||
|
||||
Upstream-Status: Submitted [https://sourceforge.net/p/expect/patches/24/]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
exp_chan.c | 5 +++--
|
||||
exp_clib.c | 4 +++-
|
||||
exp_main_sub.c | 5 +++++
|
||||
pty_termios.c | 4 ++++
|
||||
4 files changed, 15 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/exp_chan.c b/exp_chan.c
|
||||
index 79f486c..50375d3 100644
|
||||
--- a/exp_chan.c
|
||||
+++ b/exp_chan.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "exp_prog.h"
|
||||
#include "exp_command.h"
|
||||
#include "exp_log.h"
|
||||
+#include "exp_event.h" /* exp_background_channelhandler */
|
||||
#include "tcldbg.h" /* Dbg_StdinMode */
|
||||
|
||||
extern int expSetBlockModeProc _ANSI_ARGS_((int fd, int mode));
|
||||
@@ -631,7 +632,7 @@ expWaitOnOne() {
|
||||
}
|
||||
|
||||
void
|
||||
-exp_background_channelhandlers_run_all()
|
||||
+exp_background_channelhandlers_run_all(void)
|
||||
{
|
||||
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
|
||||
ExpState *esPtr;
|
||||
@@ -760,7 +761,7 @@ expCreateChannel(interp,fdin,fdout,pid)
|
||||
}
|
||||
|
||||
void
|
||||
-expChannelInit() {
|
||||
+expChannelInit(void) {
|
||||
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
|
||||
|
||||
tsdPtr->channelCount = 0;
|
||||
diff --git a/exp_clib.c b/exp_clib.c
|
||||
index b21fb5d..8f31fc3 100644
|
||||
--- a/exp_clib.c
|
||||
+++ b/exp_clib.c
|
||||
@@ -9,13 +9,14 @@ would appreciate credit if this program or parts of it are used.
|
||||
|
||||
#include "expect_cf.h"
|
||||
#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
#include <setjmp.h>
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
-
|
||||
+#include <sys/wait.h>
|
||||
#ifdef TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
@@ -1738,6 +1739,7 @@ int exp_getptyslave();
|
||||
#define sysreturn(x) return(errno = x, -1)
|
||||
|
||||
void exp_init_pty();
|
||||
+void exp_init_tty();
|
||||
|
||||
/*
|
||||
The following functions are linked from the Tcl library. They
|
||||
diff --git a/exp_main_sub.c b/exp_main_sub.c
|
||||
index bf6c4be..f53b89e 100644
|
||||
--- a/exp_main_sub.c
|
||||
+++ b/exp_main_sub.c
|
||||
@@ -61,6 +61,11 @@ int exp_cmdlinecmds = FALSE;
|
||||
int exp_interactive = FALSE;
|
||||
int exp_buffer_command_input = FALSE;/* read in entire cmdfile at once */
|
||||
int exp_fgets();
|
||||
+int exp_tty_cooked_echo(
|
||||
+ Tcl_Interp *interp,
|
||||
+ exp_tty *tty_old,
|
||||
+ int *was_raw,
|
||||
+ int *was_echo);
|
||||
|
||||
Tcl_Interp *exp_interp; /* for use by signal handlers who can't figure out */
|
||||
/* the interpreter directly */
|
||||
diff --git a/pty_termios.c b/pty_termios.c
|
||||
index c605b23..80ed5e7 100644
|
||||
--- a/pty_termios.c
|
||||
+++ b/pty_termios.c
|
||||
@@ -7,6 +7,7 @@ would appreciate credit if you use this file or parts of it.
|
||||
|
||||
*/
|
||||
|
||||
+#include <pty.h> /* openpty */
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
|
||||
@@ -15,6 +16,9 @@ would appreciate credit if you use this file or parts of it.
|
||||
#endif
|
||||
|
||||
#include "expect_cf.h"
|
||||
+#include "tclInt.h"
|
||||
+
|
||||
+extern char * expErrnoMsg _ANSI_ARGS_((int));
|
||||
|
||||
/*
|
||||
The following functions are linked from the Tcl library. They
|
||||
@@ -26,7 +26,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
|
||||
file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \
|
||||
file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \
|
||||
file://0001-fixline1-fix-line-1.patch \
|
||||
"
|
||||
file://0001-Add-prototype-to-function-definitions.patch \
|
||||
"
|
||||
SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
|
||||
SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user