$NetBSD: patch-ag,v 1.4 2005/08/16 15:35:51 adam Exp $ --- src/libgame/joystick.c.orig 2005-07-23 19:10:58.000000000 +0000 +++ 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 #endif #include "joystick.h" -#include "misc.h" /* ========================================================================= */ @@ -68,7 +69,7 @@ void UnixInitJoysticks() 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 @@ -87,7 +88,7 @@ boolean UnixReadJoystick(int fd, int *x, 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)