Index: code/branches/mac_osx/cmake/PackageConfigMSVC.cmake
===================================================================
--- code/branches/mac_osx/cmake/PackageConfigMSVC.cmake	(revision 8069)
+++ code/branches/mac_osx/cmake/PackageConfigMSVC.cmake	(revision 8070)
@@ -56,4 +56,6 @@
   SET(TCL_LIBRARY  ${DEP_LIBRARY_DIR}/tcl85.lib CACHE FILEPATH "")
   SET(ZLIB_LIBRARY ${DEP_LIBRARY_DIR}/zdll.lib  CACHE FILEPATH "")
+  # Part of Platform SDK and usually gets linked automatically
+  SET(WMI_LIBRARY  wbemuuid.lib)
 
   # Visual Leak Detector
Index: code/branches/mac_osx/cmake/PackageConfigMinGW.cmake
===================================================================
--- code/branches/mac_osx/cmake/PackageConfigMinGW.cmake	(revision 8069)
+++ code/branches/mac_osx/cmake/PackageConfigMinGW.cmake	(revision 8070)
@@ -50,3 +50,7 @@
   SET(ZLIB_LIBRARY ${DEP_BINARY_DIR}/zlib1.dll CACHE FILEPATH "")
 
+  # Not included in MinGW, so we need to supply it for OIS
+  SET(WMI_INCLUDE_DIR ${DEP_INCLUDE_DIR}/wmi/include)
+  SET(WMI_LIBRARY     ${DEP_LIBRARY_DIR}/wbemuuid.lib)
+
 ENDIF(MINGW)
Index: code/branches/mac_osx/src/external/ois/CMakeLists.txt
===================================================================
--- code/branches/mac_osx/src/external/ois/CMakeLists.txt	(revision 8069)
+++ code/branches/mac_osx/src/external/ois/CMakeLists.txt	(revision 8070)
@@ -56,4 +56,9 @@
 ADD_COMPILER_FLAGS("-D_WIN32_DCOM" MSVC8)
 
+# MinGW doesn't come with some required Windows headers
+IF(MINGW)
+  INCLUDE_DIRECTORIES(${WMI_INCLUDE_DIR})
+ENDIF()
+
 ORXONOX_ADD_LIBRARY(ois_orxonox
   ORXONOX_EXTERNAL
@@ -67,5 +72,5 @@
 
 IF(WIN32)
-  TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES})
+  TARGET_LINK_LIBRARIES(ois_orxonox ${DIRECTX_LIBRARIES} ${WMI_LIBRARY})
 ELSEIF(APPLE)
   TARGET_LINK_LIBRARIES(ois_orxonox "/System/Library/Frameworks/IOKit.framework" "/System/Library/Frameworks/Carbon.framework")
Index: code/branches/mac_osx/src/external/ois/changes_orxonox.diff
===================================================================
--- code/branches/mac_osx/src/external/ois/changes_orxonox.diff	(revision 8069)
+++ code/branches/mac_osx/src/external/ois/changes_orxonox.diff	(revision 8070)
@@ -49,4 +49,47 @@
 
 
+--- win32/Win32JoyStick.cpp
++++ win32/Win32JoyStick.cpp
+@@ -26,6 +26,14 @@
+ #include "OISEvents.h"
+ #include "OISException.h"
+ 
++// (Orxonox): Required for MinGW to compile properly
++#ifdef __MINGW32__
++#  include <oaidl.h>
++#  ifndef __MINGW_EXTENSION
++#    define __MINGW_EXTENSION __extension__
++#  endif
++#endif
++
+ #include <cassert>
+ #include <wbemidl.h>
+ #include <oleauto.h>
+@@ -39,6 +47,11 @@
+    }
+ #endif
+ 
++// (Orxonox): MinGW doesn't have swscanf_s
++#ifdef __MINGW32__
++#	define swscanf_s swscanf
++#endif
++
+ #ifdef OIS_WIN32_XINPUT_SUPPORT
+ #	pragma comment(lib, "xinput.lib")
+ #endif
+@@ -583,7 +596,12 @@
+     bool bCleanupCOM = SUCCEEDED(hr);
+ 
+     // Create WMI
++    // (Orxonox): Fix for MinGW
++#ifdef __MINGW32__
++    hr = CoCreateInstance(CLSID_WbemLocator, NULL, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID*)&pIWbemLocator);
++#else
+     hr = CoCreateInstance(__uuidof(WbemLocator), NULL, CLSCTX_INPROC_SERVER, __uuidof(IWbemLocator), (LPVOID*)&pIWbemLocator);
++#endif
+     if( FAILED(hr) || pIWbemLocator == NULL )
+         goto LCleanup;
+ 
+
 --- mac/MacHIDManager.cpp
 +++ mac/MacHIDManager.cpp
Index: code/branches/mac_osx/src/external/ois/win32/Win32JoyStick.cpp
===================================================================
--- code/branches/mac_osx/src/external/ois/win32/Win32JoyStick.cpp	(revision 8069)
+++ code/branches/mac_osx/src/external/ois/win32/Win32JoyStick.cpp	(revision 8070)
@@ -26,4 +26,12 @@
 #include "OISEvents.h"
 #include "OISException.h"
+
+// (Orxonox): Required for MinGW to compile properly
+#ifdef __MINGW32__
+#  include <oaidl.h>
+#  ifndef __MINGW_EXTENSION
+#    define __MINGW_EXTENSION __extension__
+#  endif
+#endif
 
 #include <cassert>
