[YOCTO #13691]

Signed-off-by: Khem Raj <[email protected]>
Cc: Ross Burton <[email protected]>
Cc: Armin Kuster <[email protected]>
---
 .../xorg-app/xterm/posix_ptys.patch           | 29 +++++++++++++++++++
 .../recipes-graphics/xorg-app/xterm_351.bb    |  4 ++-
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-graphics/xorg-app/xterm/posix_ptys.patch

diff --git a/meta-oe/recipes-graphics/xorg-app/xterm/posix_ptys.patch 
b/meta-oe/recipes-graphics/xorg-app/xterm/posix_ptys.patch
new file mode 100644
index 0000000000..54020d53e9
--- /dev/null
+++ b/meta-oe/recipes-graphics/xorg-app/xterm/posix_ptys.patch
@@ -0,0 +1,29 @@
+there is no test to define HAVE_GRANTPT_PTY_ISATTY and
+_POSIX_SOURCE is app-defined not system
+This fix ptys and launching xterm
+
+Upstream-Status: Pending
+
+Suggested By Rich Felker
+Signed-off-by: Khem Raj <[email protected]>
+
+--- a/main.c
++++ b/main.c
+@@ -2892,7 +2892,7 @@ get_pty(int *pty, char *from GCC_UNUSED)
+       close(opened_tty);
+       opened_tty = -1;
+     }
+-#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME) && 
defined(HAVE_GRANTPT_PTY_ISATTY)
++#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME)
+     if ((*pty = posix_openpt(O_RDWR)) >= 0) {
+       char *name = ptsname(*pty);
+       if (name != 0) {
+@@ -4040,7 +4040,7 @@ spawnXTerm(XtermWidget xw, unsigned line
+           /*
+            * now in child process
+            */
+-#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || 
defined(__SCO__) || defined(__QNX__)
++#if defined(_POSIX_VERSION) || defined(SVR4) || defined(__convex__) || 
defined(__SCO__) || defined(__QNX__)
+           int pgrp = setsid();        /* variable may not be used... */
+ #else
+           int pgrp = getpid();
diff --git a/meta-oe/recipes-graphics/xorg-app/xterm_351.bb 
b/meta-oe/recipes-graphics/xorg-app/xterm_351.bb
index 394d2cb9de..abfda8a5fa 100644
--- a/meta-oe/recipes-graphics/xorg-app/xterm_351.bb
+++ b/meta-oe/recipes-graphics/xorg-app/xterm_351.bb
@@ -4,7 +4,9 @@ DEPENDS = "libxaw xorgproto libxext libxau libxinerama libxpm 
ncurses"
 
 LIC_FILES_CHKSUM = 
"file://xterm.h;beginline=3;endline=31;md5=c7faceb872d90115e7c0ad90e90c390d"
 
-SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz";
+SRC_URI = "http://invisible-mirror.net/archives/${BPN}/${BP}.tgz \
+           file://posix_ptys.patch \
+          "
 
 SRC_URI[md5sum] = "a07edfbee2e2f4c6a9ddbf834fa4bbec"
 SRC_URI[sha256sum] = 
"760a8a10221c9c9744afd86db87c7ad95bbf9be4f5f525fecf39125f0d2a6e16"
-- 
2.24.1

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Reply via email to