#include <sys/select.h>
#endif
-#ifdef HAVE_SYS_STROPTS_H
-#include <sys/stropts.h> /* isastream(), I_PUSH */
+#ifdef HAVE_STROPTS_H
+#include <stropts.h> /* isastream(), I_PUSH */
#endif
-#ifdef HAVE_SYS_STRTIO_H
-#include <sys/strtio.h> /* TIOCSIGNAL */
+#ifdef HAVE_STRTIO_H
+#include <strtio.h> /* TIOCSIGNAL */
#endif
#ifdef HAVE_PTY_H
#endif
#ifdef HAVE_LIBUTIL_H
-#include <libutil.h> /* openpty() on BSD */
+#include <libutil.h> /* openpty() on FreeBSD */
+#endif
+
+#ifdef HAVE_UTIL_H
+#include <util.h> /* openpty() on NetBSD */
#endif
#ifdef FD_SET