]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
expect: update code for Tcl channel implementation
authorRoss Burton <ross.burton@arm.com>
Wed, 1 Oct 2025 20:58:34 +0000 (22:58 +0200)
committerSteve Sakoman <steve@sakoman.com>
Thu, 2 Oct 2025 15:40:43 +0000 (08:40 -0700)
Tcl 8.4.0 changed the channel implementation, take a patch submitted
upstream to update the code for the new interface and remove the silencing
of the incompatible assignment error which was due to this issue.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-devtools/expect/expect/tcl840.patch [new file with mode: 0644]
meta/recipes-devtools/expect/expect_5.45.4.bb

diff --git a/meta/recipes-devtools/expect/expect/tcl840.patch b/meta/recipes-devtools/expect/expect/tcl840.patch
new file mode 100644 (file)
index 0000000..8c7b0e7
--- /dev/null
@@ -0,0 +1,27 @@
+Adjustments for compatibility with the currrent (Tcl 8.4.0+) channel
+implementation.
+
+Upstream-Status: Submitted [https://sourceforge.net/p/expect/patches/24/]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+diff --git a/exp_chan.c b/exp_chan.c
+index c92e26b6fbd02305..944200a63b102672 100644
+--- a/exp_chan.c
++++ b/exp_chan.c
+@@ -60,7 +60,7 @@ void                 exp_background_channelhandler _ANSI_ARGS_((ClientData,
+ Tcl_ChannelType expChannelType = {
+     "exp",                            /* Type name. */
+-    ExpBlockModeProc,                 /* Set blocking/nonblocking mode.*/
++    TCL_CHANNEL_VERSION_2,
+     ExpCloseProc,                     /* Close proc. */
+     ExpInputProc,                     /* Input proc. */
+     ExpOutputProc,                    /* Output proc. */
+@@ -70,6 +70,7 @@ Tcl_ChannelType expChannelType = {
+     ExpWatchProc,                     /* Initialize notifier. */
+     ExpGetHandleProc,                 /* Get OS handles out of channel. */
+     NULL,                             /* Close2 proc */
++    ExpBlockModeProc,                 /* Set blocking/nonblocking mode.*/
+ };
+ typedef struct ThreadSpecificData {
index 174b35ec73962c52b757298f1d3d0be3b7ff13a0..461a2c093aa2bf3738420eae3d22b3ad3d820f1f 100644 (file)
@@ -28,6 +28,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/expect/Expect/${PV}/${BPN}${PV}.tar.gz \
            file://0001-fixline1-fix-line-1.patch \
            file://0001-Add-prototype-to-function-definitions.patch \
            file://expect-configure-c99.patch \
+           file://tcl840.patch \
            file://run-ptest \
            "
 SRC_URI[md5sum] = "00fce8de158422f5ccd2666512329bd2"
@@ -82,7 +83,3 @@ FILES:${PN} += "${libdir}/libexpect${PV}.so \
                "
 
 BBCLASSEXTEND = "native nativesdk"
-
-# http://errors.yoctoproject.org/Errors/Details/766950/
-# expect5.45.4/exp_chan.c:62:5: error: initialization of 'struct Tcl_ChannelTypeVersion_ *' from incompatible pointer type 'int (*)(void *, int)' [-Wincompatible-pointer-types]
-CFLAGS += "-Wno-error=incompatible-pointer-types"