$NetBSD: patch-ba,v 1.6 2022/04/24 10:57:28 tnn Exp $

Deal with mouse headers.
Fix illegal C.
Dragonfly support.

--- remote.c.orig	2001-02-12 21:05:08.000000000 +0000
+++ remote.c
@@ -33,6 +33,8 @@
 
 /*      ******************** Include Files                ************** */
 
+#include "netbsdconf.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <errno.h>
@@ -52,9 +54,13 @@
 # else
 #  include <machine/mouse.h>
 # endif
+#elif defined(__DragonFly__)
+# include <sys/mouse.h>
 #else
+#if HAVE_MOUSE_H
 # include <machine/mouse.h>
 #endif
+#endif
 #include <X11/Intrinsic.h>
 #include "tvdebug.h"
 #include "tvutil.h"
@@ -62,10 +68,12 @@
 #include "haup_remote.h"
 #include "pixelview_remote.h"
 
+#if HAVE_MOUSE_H
+
 /*      ******************** Local defines                ************** */
 
 /*  FIXME: Remove this old code someday  */
-#ifdef 0
+#if 0
 #  define OLD_DEV_SYSMOUSE_STUFF
 #endif
 
@@ -847,3 +855,18 @@ void TVREMOTEFlush( void )
     case REMOTE_TYPE_PIXELVIEW :  TVPIXELVIEWREMOTEFlush(); break;
   }
 }
+
+#else /* HAVE_MOUSE_H */
+void
+TVREMOTEOpen( XtAppContext       app_ctx, 
+	char               rem_type[], 
+	TVREMOTE_CB_FUNCT *cb )
+	{
+	}
+
+void
+TVREMOTEFlush( void )
+	{
+	}
+
+#endif /* HAVE_MOUSE_H */
