Fix build on NetBSD.
(cherry picked from commit 06e1d815cf9abda49b845754ff420734446eb95b)
This commit is contained in:
parent
0b64b227b5
commit
c4294ad590
@ -46,21 +46,20 @@
|
||||
|
||||
# ifdef HAVE_USB_JS
|
||||
# if defined(__NetBSD__)
|
||||
/* XXX The below hack is done until freeglut's autoconf is updated. */
|
||||
# define HAVE_USBHID_H 1
|
||||
# ifdef HAVE_USBHID_H
|
||||
# include <usbhid.h>
|
||||
# else
|
||||
# include <usb.h>
|
||||
# endif
|
||||
# include <dev/usb/usb.h>
|
||||
# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
# ifdef HAVE_USBHID_H
|
||||
# include <usbhid.h>
|
||||
# else
|
||||
# include <libusbhid.h>
|
||||
# endif
|
||||
# include <legacy/dev/usb/usb.h>
|
||||
# endif
|
||||
# include <legacy/dev/usb/usb.h>
|
||||
# include <dev/usb/usbhid.h>
|
||||
|
||||
/* Compatibility with older usb.h revisions */
|
||||
|
@ -50,7 +50,7 @@ void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
|
||||
{
|
||||
int status;
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__)
|
||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||
int len;
|
||||
|
||||
if ( joy->pJoystick.os->is_analog )
|
||||
@ -215,7 +215,7 @@ void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
|
||||
|
||||
void fgPlatformJoystickOpen( SFG_Joystick* joy )
|
||||
{
|
||||
#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) || defined( __NetBSD__ )
|
||||
#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__)
|
||||
int i = 0;
|
||||
char *cp;
|
||||
#endif
|
||||
@ -229,7 +229,7 @@ void fgPlatformJoystickOpen( SFG_Joystick* joy )
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) || defined( __NetBSD__ )
|
||||
#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__)
|
||||
for( i = 0; i < _JS_MAX_AXES; i++ )
|
||||
joy->pJoystick.os->cache_axes[ i ] = 0.0f;
|
||||
|
||||
@ -409,7 +409,7 @@ void fgPlatformJoystickOpen( SFG_Joystick* joy )
|
||||
|
||||
void fgPlatformJoystickInit( SFG_Joystick *fgJoystick[], int ident )
|
||||
{
|
||||
#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) || defined( __NetBSD__ )
|
||||
#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__)
|
||||
fgJoystick[ ident ]->id = ident;
|
||||
fgJoystick[ ident ]->error = GL_FALSE;
|
||||
|
||||
@ -436,7 +436,7 @@ void fgPlatformJoystickInit( SFG_Joystick *fgJoystick[], int ident )
|
||||
|
||||
void fgPlatformJoystickClose ( int ident )
|
||||
{
|
||||
#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__) || defined( __NetBSD__ )
|
||||
#if defined( __FreeBSD__ ) || defined(__FreeBSD_kernel__)
|
||||
if( fgJoystick[ident]->pJoystick.os )
|
||||
{
|
||||
if( ! fgJoystick[ ident ]->error )
|
||||
|
Reference in New Issue
Block a user