pkg/59785: misc/screen: bug #67525

[email protected]
Newsgroups gmane.os.netbsd.devel.pkgsrc.bugs
Message-ID <[email protected]>
>Number:         59785
>Category:       pkg
>Synopsis:       misc/screen: bug #67525
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 23 04:00:00 +0000 2025
>Originator:     NAKAJI Hiroyuki
>Release:        Solaris 11.4
>Organization:
Tottori Univ. of Environmental Studies
>Environment:
SunOS solaris.4407.kankyo-u.ac.jp 5.11 11.4.0.15.0 i86pc i386 i86pc
>Description:
As described in https://savannah.gnu.org/bugs/?func=detailitem&item_id=67525 , screen-5.0.0 and 5.0.1 do not build on Solaris 11 with an error.

gcc -c -D_XOPEN_SOURCE=600 -D__EXTENSIONS__ -I/usr/pkg/include/ncurses -I/usr/pkg/include -I/usr/include -iquote. -DSCREENENCODINGS='"/usr/pkg/share/screen/utf8encodings"' -DBUILD_DATE='"2025-11-23 08:11:12"' -O2 -I/usr/pkg/include/ncurses -I/usr/pkg/include -I/usr/include -Wall -Wextra -std=c17 tty.c -o tty.o
tty.c: In function 'TtyGrabConsole':
tty.c:871:36: error: 'TIOCCONS' undeclared (first use in this function)
  871 |   UserReturn(ioctl(consredirfd[1], TIOCCONS, (char *)&on));
      |                                    ^~~~~~~~
tty.c:871:36: note: each undeclared identifier is reported only once for each function it appears in
gmake: *** [Makefile:69: tty.o] Error 1

>How-To-Repeat:
/usr/pkg/bin/bmake -C pkgsrc/misc/screen all

>Fix:
--- tty.c.orig
+++ tty.c
@@ -41,6 +41,11 @@ #include <sys/file.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
 
+/* For SRIOCSREDIR on Solaris */
+#if defined(__sun__)                                                        
+# include <sys/strredir.h>  
+#endif
+
 #include "screen.h"
 #include "fileio.h"
 #include "misc.h"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.