$NetBSD: patch-ag,v 1.3 2002/10/19 20:06:46 heinz Exp $

--- src/libgame/joystick.c.orig	Mon Jul 22 01:13:43 2002
+++ src/libgame/joystick.c
@@ -11,12 +11,13 @@
 * joystick.c                                               *
 ***********************************************************/
 
-#if defined(PLATFORM_FREEBSD)
+#include "misc.h"
+
+#if defined(PLATFORM_FREEBSD) || (defined(PLATFORM_NETBSD) && defined(HAVE_JOYSTICK))
 #include <machine/joystick.h>
 #endif
 
 #include "joystick.h"
-#include "misc.h"
 
 
 /* ========================================================================= */
@@ -60,7 +61,7 @@
 
 boolean UnixReadJoystick(int fd, int *x, int *y, boolean *b1, boolean *b2)
 {
-#if defined(PLATFORM_FREEBSD)
+#if defined(PLATFORM_FREEBSD) || (defined(PLATFORM_NETBSD) && defined(HAVE_JOYSTICK))
   struct joystick joy_ctrl;
 #else
   struct joystick_control
@@ -79,7 +80,7 @@
   if (y != NULL)
     *y = joy_ctrl.y;
 
-#if defined(PLATFORM_FREEBSD)
+#if defined(PLATFORM_FREEBSD) || (defined(PLATFORM_NETBSD) && defined(HAVE_JOYSTICK))
   if (b1 != NULL)
     *b1 = joy_ctrl.b1;
   if (b2 != NULL)
