File 3063-erts-Use-dev-tty-for-display_string-stdin-.-on-linux.patch of Package erlang

From e374e3feea4194480746fe35e80c0e3fbe65d552 Mon Sep 17 00:00:00 2001
From: Sverker Eriksson <sverker@erlang.org>
Date: Thu, 10 Nov 2022 18:27:02 +0100
Subject: [PATCH 3/3] erts: Use /dev/tty for display_string(stdin,..) on linux
 as well

Motivation: Seems to work, less code.
---
 erts/emulator/beam/bif.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 9ac40bab33..5ccb62800d 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -4210,11 +4210,7 @@ BIF_RETTYPE display_string_2(BIF_ALIST_2)
     }
 #if defined(HAVE_SYS_IOCTL_H) && defined(TIOCSTI)
     else if (ERTS_IS_ATOM_STR("stdin", BIF_ARG_1)) {
-#  if defined(__FreeBSD__)
         const char stdin_fname[] = "/dev/tty";
-#  else
-        const char stdin_fname[] = "/proc/self/fd/0";
-#  endif
         fd = open(stdin_fname,0);
         if (fd < 0) {
             fprintf(stderr,"failed to open %s (%s)\r\n", stdin_fname,
-- 
2.35.3

openSUSE Build Service is sponsored by