logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0012-readpassphrase-Support-systems-without-VSTATUS-and-T.patch (1045B)


  1. From d36036bbd959091b6442d003128342ed515af01b Mon Sep 17 00:00:00 2001
  2. From: Michael Forney <mforney@mforney.org>
  3. Date: Sun, 26 Feb 2017 17:01:33 -0800
  4. Subject: [PATCH] readpassphrase: Support systems without VSTATUS and TCSASOFT
  5. ---
  6. lib/libc/gen/readpassphrase.c | 6 ++++++
  7. 1 file changed, 6 insertions(+)
  8. diff --git a/lib/libc/gen/readpassphrase.c b/lib/libc/gen/readpassphrase.c
  9. index a1aeb342b..a50eaf003 100644
  10. --- a/lib/libc/gen/readpassphrase.c
  11. +++ b/lib/libc/gen/readpassphrase.c
  12. @@ -32,6 +32,10 @@
  13. #include <unistd.h>
  14. #include <readpassphrase.h>
  15. +#ifndef TCSASOFT
  16. +#define TCSASOFT 0
  17. +#endif
  18. +
  19. static volatile sig_atomic_t signo[_NSIG];
  20. static void handler(int);
  21. @@ -81,8 +85,10 @@ restart:
  22. memcpy(&term, &oterm, sizeof(term));
  23. if (!(flags & RPP_ECHO_ON))
  24. term.c_lflag &= ~(ECHO | ECHONL);
  25. +#ifdef VSTATUS
  26. if (term.c_cc[VSTATUS] != _POSIX_VDISABLE)
  27. term.c_cc[VSTATUS] = _POSIX_VDISABLE;
  28. +#endif
  29. (void)tcsetattr(input, TCSAFLUSH|TCSASOFT, &term);
  30. } else {
  31. memset(&term, 0, sizeof(term));
  32. --
  33. 2.12.2