diff mbox series

package/screen: fix compile issue

Message ID ZrWionLijDXHPUjW@waldemar-brodkorb.de
State Changes Requested
Headers show
Series package/screen: fix compile issue | expand

Commit Message

Waldemar Brodkorb Aug. 9, 2024, 5:01 a.m. UTC
screen fails to compile with:
pty.c: In function 'OpenPTY':
pty.c:338:7: error: implicit declaration of function 'openpty'; did you mean 'OpenPTY'? [-Wimplicit-function-declaration]
  338 |   if (openpty(&f, &s, TtyName, NULL, NULL) != 0)
      |       ^~~~~~~
      |       OpenPTY

Add a patch to include pty.h. Similar change is already in Upstream
git repository.

Fixes:
 - http://autobuild.buildroot.net/results/a3f/a3fbd312c6946604e22540c78104e15f7a8d2281

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
---
 .../0008-add-missing-pty.h-header.patch       | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 package/screen/0008-add-missing-pty.h-header.patch

Comments

Thomas Petazzoni Aug. 9, 2024, 10:09 p.m. UTC | #1
Hello Waldemar,

On Fri, 9 Aug 2024 07:01:22 +0200
Waldemar Brodkorb <wbx@openadk.org> wrote:

> Add a patch to include pty.h. Similar change is already in Upstream
> git repository.

Could you please backport the real upstream commit, as-is, and refer to
the upstream commit?

Thanks a lot!

Thomas
Waldemar Brodkorb Aug. 10, 2024, 6:33 a.m. UTC | #2
Hi Thomas,
Thomas Petazzoni wrote,

> Hello Waldemar,
> 
> On Fri, 9 Aug 2024 07:01:22 +0200
> Waldemar Brodkorb <wbx@openadk.org> wrote:
> 
> > Add a patch to include pty.h. Similar change is already in Upstream
> > git repository.
> 
> Could you please backport the real upstream commit, as-is, and refer to
> the upstream commit?
> 
> Thanks a lot!

I had done this if it was possible. I can't get it to work.
They removed some stuff in d34b7dfd9b5bf35acbb0e434f820a00b467bdc8a
and added <pty.h>. Then later in 3251f5b2e4bb165edc562702527d548e38aac897
they changed it again. 

Unfortunately it is not possible to git am the patches.

What should we do now? Could you take a look?

It is a real trivial change and the patch can be removed as soon as
5.0.0 is out.

best regards
 Waldemar
diff mbox series

Patch

diff --git a/package/screen/0008-add-missing-pty.h-header.patch b/package/screen/0008-add-missing-pty.h-header.patch
new file mode 100644
index 0000000000..3964316758
--- /dev/null
+++ b/package/screen/0008-add-missing-pty.h-header.patch
@@ -0,0 +1,26 @@ 
+From 8c32bc91a86ea51cad36405b592504acb31b7cba Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@openadk.org>
+Date: Fri, 9 Aug 2024 06:23:06 +0200
+Subject: [PATCH] add missing pty.h header
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+Upstream: https://git.savannah.gnu.org/cgit/screen.git/tree/src/pty.c#n38
+---
+ pty.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pty.c b/pty.c
+index 6791fd5..093273d 100644
+--- a/pty.c
++++ b/pty.c
+@@ -29,6 +29,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <pty.h>
+ #include <signal.h>
+ 
+ #if defined(__OpenBSD__)
+-- 
+2.39.2
+