From: Max Krummenacher <max.oss.09@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: Max Krummenacher <max.oss.09@gmail.com>
Subject: [meta-oe][PATCH] joe: Fix assign to stdin, use freopen instead
Date: Thu, 16 Jul 2026 09:47:16 +0200 [thread overview]
Message-ID: <20260716074716.3679-1-max.oss.09@gmail.com> (raw)
This fixes building with musl.
Upstream disscussion: https://github.com/joe-editor/joe/issues/115
Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
---
...n-to-stdin-use-freopen-instead-issue.patch | 31 +++++++++++++++++++
meta-oe/recipes-support/joe/joe_4.8.bb | 5 ++-
2 files changed, 35 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-support/joe/joe/0001-Fix-assign-to-stdin-use-freopen-instead-issue.patch
diff --git a/meta-oe/recipes-support/joe/joe/0001-Fix-assign-to-stdin-use-freopen-instead-issue.patch b/meta-oe/recipes-support/joe/joe/0001-Fix-assign-to-stdin-use-freopen-instead-issue.patch
new file mode 100644
index 000000000000..53c9edd6dbee
--- /dev/null
+++ b/meta-oe/recipes-support/joe/joe/0001-Fix-assign-to-stdin-use-freopen-instead-issue.patch
@@ -0,0 +1,31 @@
+From 0be9f4f2b7c4202b183f65aa65ecfd32f565385d Mon Sep 17 00:00:00 2001
+From: Joe Allen <jhallenworld@gmail.com>
+Date: Wed, 6 May 2026 09:34:34 -0400
+Subject: [PATCH] Fix assign to stdin, use freopen instead issue
+
+Upstream-Status: Backport [0be9f4f2b7c4202b183f65aa65ecfd32f565385d]
+Signed-off-by: Max Krummenacher <max.oss.09@gmail.com>
+
+---
+ joe/main.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/joe/main.c b/joe/main.c
+index bfbfb90711e8..61f0324ee094 100644
+--- a/joe/main.c
++++ b/joe/main.c
+@@ -755,7 +755,10 @@ int main(int argc, char **real_argv, const char * const *envv)
+ /* Close stdin, so that if user kills the copying the program feeding stdin sees a SIGPIPE */
+ /* It won't if there are any extra file descriptors open */
+ fclose(stdin);
+- stdin = fopen("/dev/tty", "rb");
++ if (!freopen("/dev/tty", "rb", stdin))
++ {
++ /* This should not fail */
++ }
+ }
+ }
+
+--
+2.51.0
+
diff --git a/meta-oe/recipes-support/joe/joe_4.8.bb b/meta-oe/recipes-support/joe/joe_4.8.bb
index 77ffc145172e..7b901e1e3b2e 100644
--- a/meta-oe/recipes-support/joe/joe_4.8.bb
+++ b/meta-oe/recipes-support/joe/joe_4.8.bb
@@ -4,7 +4,10 @@ HOMEPAGE = "http://joe-editor.sourceforge.net/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
-SRC_URI = "${SOURCEFORGE_MIRROR}/joe-editor/joe-${PV}.tar.gz"
+SRC_URI = " \
+ ${SOURCEFORGE_MIRROR}/joe-editor/joe-${PV}.tar.gz \
+ file://0001-Fix-assign-to-stdin-use-freopen-instead-issue.patch \
+"
PACKAGECONFIG ??= "curses"
PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,ncurses-terminfo"
--
2.51.0
reply other threads:[~2026-07-16 7:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260716074716.3679-1-max.oss.09@gmail.com \
--to=max.oss.09@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.