$NetBSD$

--- ex/ex_script.c.orig	2000-05-02 19:28:05.000000000 -0700
+++ ex/ex_script.c
@@ -23,7 +23,7 @@ static const char sccsid[] = "@(#)ex_scr
 #include <sys/select.h>
 #endif
 #include <sys/stat.h>
-#ifdef HAVE_SYS5_PTY
+#if defined(HAVE_SYS5_PTY) && defined(HAVE_SYS_STROPTS_H)
 #include <sys/stropts.h>
 #endif
 #include <sys/time.h>
@@ -625,7 +625,7 @@ sscr_check(sp)
 	F_CLR(gp, G_SCRWIN);
 }
 
-#ifdef HAVE_SYS5_PTY
+#if defined(HAVE_SYS5_PTY) && defined(HAVE_SYS_STROPTS_H)
 static int ptys_open __P((int, char *));
 static int ptym_open __P((char *));
 
