diff -urN vbox-trunk-bk\include/iprt/cpp/ministring.h vbox-trunk\include/iprt/cpp/ministring.h
--- vbox-trunk-bk\include/iprt/cpp/ministring.h	2015-10-25 02:44:44.000000000 +0300
+++ vbox-trunk\include/iprt/cpp/ministring.h	2015-10-18 19:40:04.000000000 +0300
@@ -1010,7 +1010,7 @@
  *
  * @relates RTCString
  */
-RTDECL(const RTCString) operator+(const RTCString &a_rstr1, const RTCString &a_rstr2);
+const RTCString operator+(const RTCString &a_rstr1, const RTCString &a_rstr2);
 
 /**
  * Concatenate two strings.
@@ -1021,7 +1021,7 @@
  *
  * @relates RTCString
  */
-RTDECL(const RTCString) operator+(const RTCString &a_rstr1, const char *a_psz2);
+const RTCString operator+(const RTCString &a_rstr1, const char *a_psz2);
 
 /**
  * Concatenate two strings.
@@ -1032,7 +1032,7 @@
  *
  * @relates RTCString
  */
-RTDECL(const RTCString) operator+(const char *a_psz1, const RTCString &a_rstr2);
+const RTCString operator+(const char *a_psz1, const RTCString &a_rstr2);
 
 /**
  * Class with RTCString::printf as constructor for your convenience.
diff -urN vbox-trunk-bk\include/iprt/string.h vbox-trunk\include/iprt/string.h
--- vbox-trunk-bk\include/iprt/string.h	2015-10-25 02:44:46.000000000 +0300
+++ vbox-trunk\include/iprt/string.h	2015-10-17 21:33:46.000000000 +0300
@@ -85,6 +85,9 @@
 # undef ffs
 # undef strpbrk
 
+#elif defined(RT_OS_OS2)
+# define __USE_GNU
+# include <string.h>
 #else
 # include <string.h>
 #endif
@@ -115,7 +118,9 @@
 
 #if !defined(RT_OS_LINUX) || !defined(_GNU_SOURCE)
 RT_C_DECLS_BEGIN
+#ifndef RT_OS_OS2
 void *memrchr(const char *pv, int ch, size_t cb);
+#endif
 RT_C_DECLS_END
 #endif
 
diff -urN vbox-trunk-bk\include/iprt/x86extra.mac vbox-trunk\include/iprt/x86extra.mac
--- vbox-trunk-bk\include/iprt/x86extra.mac	2015-10-25 02:44:48.000000000 +0300
+++ vbox-trunk\include/iprt/x86extra.mac	2015-10-14 00:32:06.000000000 +0300
@@ -140,7 +140,9 @@
         .ds             resw 1
         .selLdt         resw 1
 endstruc
+%ifndef RT_OS_OS2
 AssertCompileSize(X86TSS16, 44)
+%endif
 
 
 struc X86TSS32
@@ -203,7 +205,9 @@
         .offIoBitmap    resw 1
         .IntRedirBitmap resb 32
 endstruc
+%ifndef RT_OS_OS2
 AssertCompileSize(X86TSS64, 136)
+%endif
 
 %endif
 
diff -urN vbox-trunk-bk\include/VBox/com/defs.h vbox-trunk\include/VBox/com/defs.h
--- vbox-trunk-bk\include/VBox/com/defs.h	2015-10-25 02:44:36.000000000 +0300
+++ vbox-trunk\include/VBox/com/defs.h	2015-10-23 21:51:38.000000000 +0300
@@ -42,6 +42,8 @@
 # endif
 # undef RT_MAX
 
+#if !defined(QT_GUI_LIB)
+
 /* Make sure OS/2 Toolkit headers are pulled in to have BOOL/ULONG/etc. typedefs
  * already defined in order to be able to redefine them using #define. */
 # define INCL_BASE
@@ -52,12 +54,20 @@
 # undef FALSE
 # undef TRUE
 
+#else
+# include <QtGui/qwindowdefs_pm.h>
+#endif /* !defined(QT_CORE_LIB) */
+
 /* */
 # undef RT_MAX
 # ifdef REDEFINE_RT_MAX
 #  define RT_MAX(Value1, Value2)                  ( (Value1) >= (Value2) ? (Value1) : (Value2) )
 # endif
 
+# undef ULONG
+# undef LONG
+# undef USHORT
+
 #endif /* defined(RT_OS_OS2) */
 
 /* Include iprt/types.h (which also includes iprt/types.h) now to make sure iprt
diff -urN vbox-trunk-bk\include/VBox/intnet.h vbox-trunk\include/VBox/intnet.h
--- vbox-trunk-bk\include/VBox/intnet.h	2015-10-25 02:44:34.000000000 +0300
+++ vbox-trunk\include/VBox/intnet.h	2015-10-14 00:32:06.000000000 +0300
@@ -1292,7 +1292,7 @@
 INTNETR0DECL(int)       IntNetR0IfSetActive(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fActive);
 INTNETR0DECL(int)       IntNetR0IfSend(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession);
 INTNETR0DECL(int)       IntNetR0IfWait(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, uint32_t cMillies);
-INTNETR0DECL(int)       IntNetR0IfAbortWait(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession);
+INTNETR0DECL(int)       IntNetR0IfAbortWait(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fNoMoreWaits);
 
 /** @} */
 #endif /* IN_RING0 */
diff -urN vbox-trunk-bk\include/VBox/sup.h vbox-trunk\include/VBox/sup.h
--- vbox-trunk-bk\include/VBox/sup.h	2015-10-25 02:44:32.000000000 +0300
+++ vbox-trunk\include/VBox/sup.h	2015-10-14 00:32:06.000000000 +0300
@@ -461,7 +461,7 @@
 #if defined(IN_SUP_R3) || defined(IN_SUP_R0)
 extern DECLEXPORT(PSUPGLOBALINFOPAGE)   g_pSUPGlobalInfoPage;
 
-#elif !defined(IN_RING0) || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS)
+#elif !defined(IN_RING0) || defined(RT_OS_WINDOWS) || defined(RT_OS_SOLARIS) || defined(RT_OS_OS2)
 extern DECLIMPORT(PSUPGLOBALINFOPAGE)   g_pSUPGlobalInfoPage;
 
 #else /* IN_RING0 && !RT_OS_WINDOWS */
diff -urN vbox-trunk-bk\include/VBox/vmm/dbgf.h vbox-trunk\include/VBox/vmm/dbgf.h
--- vbox-trunk-bk\include/VBox/vmm/dbgf.h	2015-10-25 02:44:42.000000000 +0300
+++ vbox-trunk\include/VBox/vmm/dbgf.h	2015-10-17 04:32:48.000000000 +0300
@@ -1516,7 +1516,7 @@
 VMMR3DECL(int) DBGFR3RegNmQueryU64( PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, uint64_t    *pu64);
 VMMR3DECL(int) DBGFR3RegNmQueryU128(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, PRTUINT128U  pu128);
 /*VMMR3DECL(int) DBGFR3RegNmQueryLrd( PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, long double *plrd);*/
-VMMR3DECL(int) DBGFR3RegNmQueryXdtr(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, uint64_t *pu64Base, uint16_t *pu16Limit);
+VMMR3DECL(int) DBGFR3RegNmQueryXdtr(PUVM pUVM, VMCPUID idDefCpu, const char *pszReg, uint64_t *pu64Base, uint32_t *pu16Limit);
 VMMR3DECL(int) DBGFR3RegNmQueryBatch(PUVM pUVM,VMCPUID idDefCpu, PDBGFREGENTRYNM paRegs, size_t cRegs);
 VMMR3DECL(int) DBGFR3RegNmQueryAllCount(PUVM pUVM, size_t *pcRegs);
 VMMR3DECL(int) DBGFR3RegNmQueryAll( PUVM pUVM,                   PDBGFREGENTRYNM paRegs, size_t cRegs);
diff -urN vbox-trunk-bk\include/VBox/vmm/gmm.h vbox-trunk\include/VBox/vmm/gmm.h
--- vbox-trunk-bk\include/VBox/vmm/gmm.h	2015-10-25 02:44:42.000000000 +0300
+++ vbox-trunk\include/VBox/vmm/gmm.h	2015-10-19 20:03:16.000000000 +0300
@@ -418,8 +418,8 @@
 GMMR0DECL(int)  GMMR0ResetSharedModules(PVM pVM, VMCPUID idCpu);
 GMMR0DECL(int)  GMMR0CheckSharedModulesStart(PVM pVM);
 GMMR0DECL(int)  GMMR0CheckSharedModulesEnd(PVM pVM);
-GMMR0DECL(int)  GMMR0QueryStatistics(PGMMSTATS pStats, PSUPDRVSESSION pSession);
-GMMR0DECL(int)  GMMR0ResetStatistics(PCGMMSTATS pStats, PSUPDRVSESSION pSession);
+GMMR0DECL(int)  GMMR0QueryStatistics(PGMMSTATS pStats, PSUPDRVSESSION pSession, PVM pVM);
+GMMR0DECL(int)  GMMR0ResetStatistics(PCGMMSTATS pStats, PSUPDRVSESSION pSession, PVM pVM);
 
 /**
  * Request buffer for GMMR0InitialReservationReq / VMMR0_DO_GMM_INITIAL_RESERVATION.
diff -urN vbox-trunk-bk\include/VBox/vmm/hm_vmx.mac vbox-trunk\include/VBox/vmm/hm_vmx.mac
--- vbox-trunk-bk\include/VBox/vmm/hm_vmx.mac	2015-10-25 02:44:42.000000000 +0300
+++ vbox-trunk\include/VBox/vmm/hm_vmx.mac	2015-10-14 00:32:06.000000000 +0300
@@ -175,8 +175,11 @@
     .uHostFSBase        resq    1
     .uHostGSBase        resq    1
 endstruc
+
+%ifndef RT_OS_OS2
+; // vs -- symbol referencies not supported in preprocess-only mode
 AssertCompileMemberOffset(VMXRESTOREHOST, HostGdtr,     16-2)
 AssertCompileMemberOffset(VMXRESTOREHOST, HostIdtr,     32-2)
 AssertCompileMemberOffset(VMXRESTOREHOST, uHostFSBase,    40)
 AssertCompileSize(VMXRESTOREHOST, 56)
-
+%endif
diff -urN vbox-trunk-bk\include/VBox/vmm/pdmapi.h vbox-trunk\include/VBox/vmm/pdmapi.h
--- vbox-trunk-bk\include/VBox/vmm/pdmapi.h	2015-10-25 02:44:42.000000000 +0300
+++ vbox-trunk\include/VBox/vmm/pdmapi.h	2015-10-17 04:55:42.000000000 +0300
@@ -46,7 +46,7 @@
 VMM_INT_DECL(int)       PDMIoApicSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level, uint32_t uTagSrc);
 VMM_INT_DECL(int)       PDMIoApicSendMsi(PVM pVM, RTGCPHYS GCAddr, uint32_t uValue, uint32_t uTagSrc);
 VMM_INT_DECL(bool)      PDMHasApic(PVM pVM);
-VMM_INT_DECL(int)       PDMApicHasPendingIrq(PVM pVM, bool *pfPending);
+VMM_INT_DECL(int)       PDMApicHasPendingIrq(PVMCPU pVCpu, bool *pfPending);
 VMMDECL(int)            PDMApicSetBase(PVMCPU pVCpu, uint64_t u64Base);
 VMMDECL(int)            PDMApicGetBase(PVMCPU pVCpu, uint64_t *pu64Base);
 VMMDECL(int)            PDMApicSetTPR(PVMCPU pVCpu, uint8_t u8TPR);
