From cf04fb419f6c9f65535da377e713faf42c7835aa Mon Sep 17 00:00:00 2001
From: Anarchos <sylvain_kerjean@hotmail.com>
Date: Sun, 30 Jan 2022 18:42:39 +0100
Subject: [PATCH] Haiku

---
 configure.ac | 2 +-
 src/ptytty.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 72e5440..23786d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,7 +284,7 @@ fi
 
 
 AC_CHECKING(for pty ranges)
-ptys=`echo /dev/pty??`
+ptys=`echo /dev/pt/??`
 pch1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
 pch2=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
 if test x$pch1 != x; then
diff --git a/src/ptytty.c b/src/ptytty.c
index 4b36a2d..e31e22a 100644
--- a/src/ptytty.c
+++ b/src/ptytty.c
@@ -156,8 +156,8 @@ ptytty_get_pty(int *fd_tty, const char **ttydev)
 #ifdef PTYS_ARE_SEARCHED
   {
     const char *c1, *c2;
-    char pty_name[] = "/dev/pty??";
-    char tty_name[] = "/dev/tty??";
+    char pty_name[] = "/dev/pt/p?";
+    char tty_name[] = "/dev/tt/??";
 
 # ifndef PTYCHAR1
 #  define PTYCHAR1      "pqrstuvwxyz"
-- 
2.30.2

