diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h index fde88be1..6dc28615 100644 --- a/include/IrrCompileConfig.h +++ b/include/IrrCompileConfig.h @@ -142,7 +142,9 @@ //! Define _IRR_COMPILE_WITH_JOYSTICK_SUPPORT_ if you want joystick events. +#if !(defined(__FreeBSD__) || defined(__OpenBSD__)) #define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ +#endif #ifdef NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_ #undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_ #endif diff --git a/source/Irrlicht/os.cpp b/source/Irrlicht/os.cpp index 2af9443a..a410a91a 100644 --- a/source/Irrlicht/os.cpp +++ b/source/Irrlicht/os.cpp @@ -25,11 +25,16 @@ #define bswap_16(X) OSReadSwapInt16(&X,0) #define bswap_32(X) OSReadSwapInt32(&X,0) #define bswap_64(X) OSReadSwapInt64(&X,0) -#elif defined(__FreeBSD__) || defined(__OpenBSD__) +#elif defined(__FreeBSD__) #include #define bswap_16(X) bswap16(X) #define bswap_32(X) bswap32(X) #define bswap_64(X) bswap64(X) +#elif defined(__OpenBSD__) + #include + #define bswap_16(X) letoh16(X) + #define bswap_32(X) letoh32(X) + #define bswap_64(X) letoh64(X) #elif !defined(_IRR_SOLARIS_PLATFORM_) && !defined(__PPC__) && !defined(_IRR_WINDOWS_API_) #include #else