posix-ptys.patch 938 B

12345678910111213141516171819202122
  1. diff -upr xterm-323.orig/main.c xterm-323/main.c
  2. --- xterm-323.orig/main.c 2016-03-09 15:30:51.191053881 +0100
  3. +++ xterm-323/main.c 2016-03-09 15:31:17.961635229 +0100
  4. @@ -2654,7 +2654,7 @@ get_pty(int *pty, char *from GCC_UNUSED)
  5. close(opened_tty);
  6. opened_tty = -1;
  7. }
  8. -#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME) && defined(HAVE_GRANTPT_PTY_ISATTY)
  9. +#elif defined(HAVE_POSIX_OPENPT) && defined(HAVE_PTSNAME)
  10. if ((*pty = posix_openpt(O_RDWR)) >= 0) {
  11. char *name = ptsname(*pty);
  12. if (name != 0) {
  13. @@ -3735,7 +3735,7 @@ spawnXTerm(XtermWidget xw)
  14. /*
  15. * now in child process
  16. */
  17. -#if defined(_POSIX_SOURCE) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__)
  18. +#if defined(_POSIX_VERSION) || defined(SVR4) || defined(__convex__) || defined(__SCO__) || defined(__QNX__)
  19. int pgrp = setsid(); /* variable may not be used... */
  20. #else
  21. int pgrp = getpid();