$OpenBSD: patch-tcap_c,v 1.3 2013/12/12 21:59:57 naddy Exp $
--- tcap.c.orig	Thu Dec 12 17:12:17 2013
+++ tcap.c	Thu Dec 12 17:14:22 2013
@@ -41,11 +41,12 @@ char *UP, PC, *CM, *CE, *CL, *SO, *SE, *TI, *TE;	/* DR
 
 #ifdef BSD
 #include <sys/ioctl.h>
+#ifdef TIOCGWINSZ
 struct winsize ttysize;
-#endif /* BSD */
-#ifdef ULTRIX
-struct winsize ttysize;
+#else
+struct ttysize ttysize;
 #endif
+#endif /* BSD */
 
 void
 putpad (str)
@@ -62,9 +63,6 @@ tcapopen ()
     char tcbuf[1024];
     char *tv_stype;
     char err_str[NCOL];
-#ifdef ULTRIX
-    struct winsize ttysize;
-#endif
 
     nrow = NROW;
 
@@ -89,7 +87,7 @@ tcapopen ()
 
 
 #ifdef BSD
-#ifdef ULTRIX
+#ifdef TIOCGWINSZ
     if (ioctl (0, TIOCGWINSZ, &ttysize) == 0
 	&& ttysize.ws_row > 0)
     {
@@ -103,7 +101,7 @@ tcapopen ()
 	nrow = ttysize.ts_lines;
     }
     else
-#endif /* ULTRIX */
+#endif /* TIOCGWINSZ */
 #endif /* BSD */
 
 #ifndef OS2
