$NetBSD: patch-ba,v 1.3 2010/11/27 12:46:53 roy Exp $

$NetBSD: patch-ba,v 1.3 2010/11/27 12:46:53 roy Exp $

--- Src/Modules/termcap.c.orig	2008-10-30 09:39:21.000000000 +0000
+++ Src/Modules/termcap.c
@@ -36,6 +36,9 @@
 #include "../../config.h"
 
 #ifdef HAVE_TGETENT
+#ifdef __NetBSD__
+# define USES_TERMCAP_H 1
+#else
 # if defined(ZSH_HAVE_CURSES_H) && defined(ZSH_HAVE_TERM_H)
 #  define USES_TERM_H 1
 # else
@@ -44,12 +47,16 @@
 #  endif
 # endif
 #endif
+#endif
 
 #include "termcap.mdh"
 #include "termcap.pro"
 
 /**/
 #ifdef HAVE_TGETENT
+#ifdef __NetBSD__
+# include <termcap.h>
+#else
 # ifdef USES_TERM_H
 #  ifdef HAVE_TERMIO_H
 #   include <termio.h>
@@ -63,6 +70,7 @@
 #   include <termcap.h>
 #  endif
 # endif
+#endif
 
 #ifndef HAVE_BOOLCODES
 static char *boolcodes[] = {
