Subject: pkg/22885: Trivial fix to get misc/ttyrec to build on SunOS
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <jonathan@perkin.org.uk>
List: netbsd-bugs
Date: 09/22/2003 09:50:58
>Number:         22885
>Category:       pkg
>Synopsis:       Trivial fix to get misc/ttyrec to build on SunOS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 22 09:52:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Perkin
>Release:        N/A
>Organization:
British Broadcasting Corporation
>Environment:
SunOS build1 5.9 Generic_112233-01 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
>Description:
ttyrec needs -DSYSV on Solaris to pick up the correct headers.
>How-To-Repeat:
===> Building for ttyrec-1.0.4
/home/jonp/pkg/gcc-3.3/bin/gcc -O   -c ttyrec.c
ttyrec.c: In function `finish':
ttyrec.c:193: error: storage size of `status' isn't known
ttyrec.c: In function `getmaster':
ttyrec.c:337: error: `O_RDWR' undeclared (first use in this function)
ttyrec.c:337: error: (Each undeclared identifier is reported only once
ttyrec.c:337: error: for each function it appears in.)
ttyrec.c:344: error: `R_OK' undeclared (first use in this function)
ttyrec.c:344: error: `W_OK' undeclared (first use in this function)
ttyrec.c: In function `getslave':
ttyrec.c:389: error: `O_RDWR' undeclared (first use in this function)
ttyrec.c:398: error: `TIOCSCTTY' undeclared (first use in this function)
*** Error code 1
>Fix:
http://www.perkin.org.uk/projects/netbsd/ttyrec.diff

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/misc/ttyrec/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile	2003/07/17 21:49:59	1.4
+++ Makefile	2003/09/22 09:50:11
@@ -8,6 +8,12 @@
 HOMEPAGE=	http://namazu.org/~satoru/ttyrec/
 COMMENT=	ttyrec is a tty recorder
 
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "SunOS"
+CFLAGS+=	-DSVR4
+.endif
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/ttyplay ${PREFIX}/bin
 	${INSTALL_PROGRAM} ${WRKSRC}/ttyrec ${PREFIX}/bin
>Release-Note:
>Audit-Trail:
>Unformatted: