summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2022-08-15 20:30:03 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-17 19:57:32 +0100
commit7dc5a703fb3c8e065e9563ca7e48d43d12ead84b (patch)
tree2dbb67bb69ed34f4263c29136660d64c059aa6ee /meta
parenta3e781582267b0842c04f3077ad3e561c1283d76 (diff)
downloadpoky-7dc5a703fb3c8e065e9563ca7e48d43d12ead84b.tar.gz
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>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/expect/expect/0001-Add-prototype-to-function-definitions.patch113
-rw-r--r--meta/recipes-devtools/expect/expect_5.45.4.bb3
2 files changed, 115 insertions, 1 deletions
diff --git a/meta/recipes-devtools/expect/expect/0001-Add-prototype-to-function-definitions.patch b/meta/recipes-devtools/expect/expect/0001-Add-prototype-to-function-definitions.patch
new file mode 100644
index 0000000000..7d211b3dff
--- /dev/null
+++ b/meta/recipes-devtools/expect/expect/0001-Add-prototype-to-function-definitions.patch
@@ -0,0 +1,113 @@
1From 904c7cf6647594939ce1e398468bca3c885f0622 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 15 Aug 2022 18:25:23 -0700
4Subject: [PATCH] Add prototype to function definitions
5
6Compilers like clang has started erroring out on implicit-function-declaration
7therefore arrange the relevant include files where needed.
8
9Upstream-Status: Submitted [https://sourceforge.net/p/expect/patches/24/]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 exp_chan.c | 5 +++--
13 exp_clib.c | 4 +++-
14 exp_main_sub.c | 5 +++++
15 pty_termios.c | 4 ++++
16 4 files changed, 15 insertions(+), 3 deletions(-)
17
18diff --git a/exp_chan.c b/exp_chan.c
19index 79f486c..50375d3 100644
20--- a/exp_chan.c
21+++ b/exp_chan.c
22@@ -35,6 +35,7 @@
23 #include "exp_prog.h"
24 #include "exp_command.h"
25 #include "exp_log.h"
26+#include "exp_event.h" /* exp_background_channelhandler */
27 #include "tcldbg.h" /* Dbg_StdinMode */
28
29 extern int expSetBlockModeProc _ANSI_ARGS_((int fd, int mode));
30@@ -631,7 +632,7 @@ expWaitOnOne() {
31 }
32
33 void
34-exp_background_channelhandlers_run_all()
35+exp_background_channelhandlers_run_all(void)
36 {
37 ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
38 ExpState *esPtr;
39@@ -760,7 +761,7 @@ expCreateChannel(interp,fdin,fdout,pid)
40 }
41
42 void
43-expChannelInit() {
44+expChannelInit(void) {
45 ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
46
47 tsdPtr->channelCount = 0;
48diff --git a/exp_clib.c b/exp_clib.c
49index b21fb5d..8f31fc3 100644
50--- a/exp_clib.c
51+++ b/exp_clib.c
52@@ -9,13 +9,14 @@ would appreciate credit if this program or parts of it are used.
53
54 #include "expect_cf.h"
55 #include <stdio.h>
56+#include <unistd.h>
57 #include <setjmp.h>
58 #ifdef HAVE_INTTYPES_H
59 # include <inttypes.h>
60 #endif
61 #include <sys/types.h>
62 #include <sys/ioctl.h>
63-
64+#include <sys/wait.h>
65 #ifdef TIME_WITH_SYS_TIME
66 # include <sys/time.h>
67 # include <time.h>
68@@ -1738,6 +1739,7 @@ int exp_getptyslave();
69 #define sysreturn(x) return(errno = x, -1)
70
71 void exp_init_pty();
72+void exp_init_tty();
73
74 /*
75 The following functions are linked from the Tcl library. They
76diff --git a/exp_main_sub.c b/exp_main_sub.c
77index bf6c4be..f53b89e 100644
78--- a/exp_main_sub.c
79+++ b/exp_main_sub.c
80@@ -61,6 +61,11 @@ int exp_cmdlinecmds = FALSE;
81 int exp_interactive = FALSE;
82 int exp_buffer_command_input = FALSE;/* read in entire cmdfile at once */
83 int exp_fgets();
84+int exp_tty_cooked_echo(
85+ Tcl_Interp *interp,
86+ exp_tty *tty_old,
87+ int *was_raw,
88+ int *was_echo);
89
90 Tcl_Interp *exp_interp; /* for use by signal handlers who can't figure out */
91 /* the interpreter directly */
92diff --git a/pty_termios.c b/pty_termios.c
93index c605b23..80ed5e7 100644
94--- a/pty_termios.c
95+++ b/pty_termios.c
96@@ -7,6 +7,7 @@ would appreciate credit if you use this file or parts of it.
97
98 */
99
100+#include <pty.h> /* openpty */
101 #include <stdio.h>
102 #include <signal.h>
103
104@@ -15,6 +16,9 @@ would appreciate credit if you use this file or parts of it.
105 #endif
106
107 #include "expect_cf.h"
108+#include "tclInt.h"
109+
110+extern char * expErrnoMsg _ANSI_ARGS_((int));
111
112 /*
113 The following functions are linked from the Tcl library. They
diff --git a/meta/recipes-devtools/expect/expect_5.45.4.bb b/meta/recipes-devtools/expect/expect_5.45.4.bb
index e22fa140d5..6cb46f334c 100644
--- a/meta/recipes-devtools/expect/expect_5.45.4.bb
+++ b/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -26,7 +26,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
26 file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \ 26 file://0001-expect-Fix-segfaults-if-Tcl-is-built-with-stubs-and-.patch \
27 file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \ 27 file://0001-exp_main_sub.c-Use-PATH_MAX-for-path.patch \
28 file://0001-fixline1-fix-line-1.patch \ 28 file://0001-fixline1-fix-line-1.patch \
29 " 29 file://0001-Add-prototype-to-function-definitions.patch \
30 "
30SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2" 31SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
31SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34" 32SRC_URI[sha256sum] = "49a7da83b0bdd9f46d04a04deec19c7767bb9a323e40c4781f89caf760b92c34"
32 33