diff -urN vbox-trunk-bk\src\VBox\Main/cbinding/Makefile.kmk vbox-trunk\src\VBox\Main/cbinding/Makefile.kmk
--- vbox-trunk-bk\src\VBox\Main/cbinding/Makefile.kmk	2015-10-25 02:59:40.000000000 +0300
+++ vbox-trunk\src\VBox\Main/cbinding/Makefile.kmk	2015-10-24 22:05:48.000000000 +0300
@@ -78,7 +78,11 @@
  VBoxCAPI_TEMPLATE = VBOXMAINCLIENTDLL
  ifdef VBOX_WITH_XPCOM
   # Keep old name on XPCOM so that legacy code is happy.
-  VBoxCAPI_INST = $(INST_BIN)VBoxXPCOMC$(VBOX_SUFF_DLL)
+  ifeq ($(KBUILD_TARGET),os2)
+    VBoxCAPI_INST = $(INST_BIN)VBoxXPC$(VBOX_SUFF_DLL)
+  else
+    VBoxCAPI_INST = $(INST_BIN)VBoxXPCOMC$(VBOX_SUFF_DLL)
+  endif
  endif
  VBoxCAPI_DEFS = IN_VBOXCAPI
  VBoxCAPI_SOURCES = \
@@ -137,6 +141,15 @@
   	tstCAPIGlue.c
   tstCAPIGlue_LIBS = \
   	$(VBoxCAPIGlue_1_TARGET)
+
+  ifeq ($(KBUILD_TARGET),os2)
+   tstCAPIGlue_LIBS += \
+	$(PATH_STAGE_LIB)/VBox-os2-poll$(VBOX_SUFF_LIB) \
+	pthread
+   tstCAPIGlue_INCS += \
+	$(PATH_SUB_CURRENT)/src/libs/poll-os2
+  endif
+
  endif
 
 endif # ! VBOX_ONLY_SDK
diff -urN vbox-trunk-bk\src\VBox\Main/cbinding/VBoxCAPIGlue.c vbox-trunk\src\VBox\Main/cbinding/VBoxCAPIGlue.c
--- vbox-trunk-bk\src\VBox\Main/cbinding/VBoxCAPIGlue.c	2015-10-25 02:59:40.000000000 +0300
+++ vbox-trunk\src\VBox\Main/cbinding/VBoxCAPIGlue.c	2015-10-24 22:12:18.000000000 +0300
@@ -55,7 +55,7 @@
 #elif defined(__APPLE__)
 # define DYNLIB_NAME        "VBoxXPCOMC.dylib"
 #elif defined(__OS2__)
-# define DYNLIB_NAME        "VBoxXPCOMC.dll"
+# define DYNLIB_NAME        "VBoxXPC.dll"
 #elif defined(WIN32)
 # define DYNLIB_NAME        "VBoxCAPI.dll"
 #else
diff -urN vbox-trunk-bk\src\VBox\Main/glue/initterm.cpp vbox-trunk\src\VBox\Main/glue/initterm.cpp
--- vbox-trunk-bk\src\VBox\Main/glue/initterm.cpp	2015-10-25 02:58:14.000000000 +0300
+++ vbox-trunk\src\VBox\Main/glue/initterm.cpp	2015-10-30 21:28:16.000000000 +0300
@@ -330,6 +330,7 @@
     char szCompReg[RTPATH_MAX];
     char szXptiDat[RTPATH_MAX];
 
+#if 1
     int vrc = GetVBoxUserHomeDirectory(szCompReg, sizeof(szCompReg));
     if (vrc == VERR_ACCESS_DENIED)
         return NS_ERROR_FILE_ACCESS_DENIED;
@@ -351,6 +352,9 @@
     LogFlowFunc(("component registry  : \"%s\"\n", szCompReg));
     LogFlowFunc(("XPTI data file      : \"%s\"\n", szXptiDat));
 
+#else
+    int vrc = NULL;
+#endif
     static const char *kAppPathsToProbe[] =
     {
         NULL, /* 0: will use VBOX_APP_HOME */
@@ -425,6 +429,14 @@
         }
         LogFlowFunc(("component directory : \"%s\"\n", szCompDir));
 
+        RTStrCopy(szCompReg, sizeof(szXptiDat), szCompDir);
+        RTStrCopy(szXptiDat, sizeof(szXptiDat), szCompReg);
+
+        vrc = RTPathAppend(szCompReg, sizeof(szCompReg), "compreg.dat");
+        AssertRCReturn(vrc, NS_ERROR_FAILURE);
+        vrc = RTPathAppend(szXptiDat, sizeof(szXptiDat), "xpti.dat");
+        AssertRCReturn(vrc, NS_ERROR_FAILURE);
+
         nsCOMPtr<DirectoryServiceProvider> dsProv;
         dsProv = new DirectoryServiceProvider();
         if (dsProv)
diff -urN vbox-trunk-bk\src\VBox\Main/glue/NativeEventQueue.cpp vbox-trunk\src\VBox\Main/glue/NativeEventQueue.cpp
--- vbox-trunk-bk\src\VBox\Main/glue/NativeEventQueue.cpp	2015-10-25 02:58:14.000000000 +0300
+++ vbox-trunk\src\VBox\Main/glue/NativeEventQueue.cpp	2015-10-30 21:29:14.000000000 +0300
@@ -24,7 +24,7 @@
 # include <CoreFoundation/CFRunLoop.h>
 #endif
 
-#if defined(VBOX_WITH_XPCOM) && !defined(RT_OS_DARWIN) && !defined(RT_OS_OS2)
+#if defined(VBOX_WITH_XPCOM) && !defined(RT_OS_DARWIN) // && !defined(RT_OS_OS2)
 # define USE_XPCOM_QUEUE
 #endif
 
@@ -36,6 +36,10 @@
 # include <errno.h>
 #endif
 
+#ifdef RT_OS_OS2
+#include <sys/time.h>
+#endif
+
 namespace com
 {
 
diff -urN vbox-trunk-bk\src\VBox\Main/include/ClientToken.h vbox-trunk\src\VBox\Main/include/ClientToken.h
--- vbox-trunk-bk\src\VBox\Main/include/ClientToken.h	2015-10-25 02:58:02.000000000 +0300
+++ vbox-trunk\src\VBox\Main/include/ClientToken.h	2015-10-30 21:50:32.000000000 +0300
@@ -31,7 +31,7 @@
 #if defined(RT_OS_WINDOWS)
 # define CTTOKENARG NULL
 # define CTTOKENTYPE HANDLE
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2)
 # define CTTOKENARG NULLHANDLE
 # define CTTOKENTYPE HMTX
 #elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER)
diff -urN vbox-trunk-bk\src\VBox\Main/include/ClientTokenHolder.h vbox-trunk\src\VBox\Main/include/ClientTokenHolder.h
--- vbox-trunk-bk\src\VBox\Main/include/ClientTokenHolder.h	2015-10-25 02:58:02.000000000 +0300
+++ vbox-trunk\src\VBox\Main/include/ClientTokenHolder.h	2015-10-30 21:32:00.000000000 +0300
@@ -28,7 +28,7 @@
 /* this second semaphore is only used on Windows */
 # define CTHTHREADSEMARG NULL
 # define CTHTHREADSEMTYPE HANDLE
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2)
 # define CTHSEMARG NIL_RTSEMEVENT
 # define CTHSEMTYPE RTSEMEVENT
 #elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER)
diff -urN vbox-trunk-bk\src\VBox\Main/include/ClientWatcher.h vbox-trunk\src\VBox\Main/include/ClientWatcher.h
--- vbox-trunk-bk\src\VBox\Main/include/ClientWatcher.h	2015-10-25 02:58:02.000000000 +0300
+++ vbox-trunk\src\VBox\Main/include/ClientWatcher.h	2015-10-30 21:32:26.000000000 +0300
@@ -29,7 +29,7 @@
 #if defined(RT_OS_WINDOWS)
 # define CWUPDATEREQARG NULL
 # define CWUPDATEREQTYPE HANDLE
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2)
 # define CWUPDATEREQARG NIL_RTSEMEVENT
 # define CWUPDATEREQTYPE RTSEMEVENT
 #elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER) || defined(VBOX_WITH_GENERIC_SESSION_WATCHER)
diff -urN vbox-trunk-bk\src\VBox\Main/include/DHCPServerImpl.h vbox-trunk\src\VBox\Main/include/DHCPServerImpl.h
--- vbox-trunk-bk\src\VBox\Main/include/DHCPServerImpl.h	2015-10-25 02:58:02.000000000 +0300
+++ vbox-trunk\src\VBox\Main/include/DHCPServerImpl.h	2015-10-14 00:45:06.000000000 +0300
@@ -27,7 +27,7 @@
 struct NETIFINFO;
 #endif
 
-#ifdef RT_OS_WINDOWS
+#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
 # define DHCP_EXECUTABLE_NAME "VBoxNetDHCP.exe"
 #else
 # define DHCP_EXECUTABLE_NAME "VBoxNetDHCP"
diff -urN vbox-trunk-bk\src\VBox\Main/include/NATNetworkImpl.h vbox-trunk\src\VBox\Main/include/NATNetworkImpl.h
--- vbox-trunk-bk\src\VBox\Main/include/NATNetworkImpl.h	2015-10-25 02:57:58.000000000 +0300
+++ vbox-trunk\src\VBox\Main/include/NATNetworkImpl.h	2015-10-14 00:45:06.000000000 +0300
@@ -30,7 +30,7 @@
     struct NATRule;
 }
 
-#ifdef RT_OS_WINDOWS
+#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
 # define NATSR_EXECUTABLE_NAME "VBoxNetNAT.exe"
 #else
 # define NATSR_EXECUTABLE_NAME "VBoxNetNAT"
diff -urN vbox-trunk-bk\src\VBox\Main/src-client/ClientTokenHolder.cpp vbox-trunk\src\VBox\Main/src-client/ClientTokenHolder.cpp
--- vbox-trunk-bk\src\VBox\Main/src-client/ClientTokenHolder.cpp	2015-10-25 02:59:32.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-client/ClientTokenHolder.cpp	2015-10-30 21:51:28.000000000 +0300
@@ -68,7 +68,7 @@
         mThread = NIL_RTTHREAD;
     }
 
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2)
 
     if (mThread != NIL_RTTHREAD)
     {
@@ -167,7 +167,7 @@
         ::CloseHandle(mThreadSem);
         mThreadSem = NULL;
     }
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2) // 0 // defined(VBOX_WITH_GENERIC_SESSION_WATCHER)
     Bstr bstrTokenId(strTokenId);
 
     /*
@@ -228,14 +228,14 @@
 
 bool Session::ClientTokenHolder::isReady()
 {
-#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
+#if !defined(VBOX_WITH_GENERIC_SESSION_WATCHER) // && !defined(RT_OS_OS2)
     return mSem != CTHSEMARG;
 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */
     return !mToken.isNull();
 #endif /* VBOX_WITH_GENERIC_SESSION_WATCHER */
 }
 
-#if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2)
+#if defined(RT_OS_WINDOWS) // || defined(RT_OS_OS2)
 /** client token holder thread */
 DECLCALLBACK(int) ClientTokenHolderThread(RTTHREAD Thread, void *pvUser)
 {
@@ -280,14 +280,16 @@
 
     /* signal we're done */
     ::SetEvent(initDoneSem);
-# elif defined(RT_OS_OS2)
-    Utf8Str sessionId = (BSTR)data[0];
+# elif 0 //defined(RT_OS_OS2)
+    //Utf8Str sessionId = (BSTR)data[0];
+    BSTR sessionId = (BSTR)data[0];
     RTSEMEVENT finishSem = (RTSEMEVENT)data[1];
 
     LogFlowFunc(("sessionId='%s', finishSem=%p\n", sessionId.raw(), finishSem));
 
     HMTX mutex = NULLHANDLE;
-    APIRET arc = ::DosOpenMutexSem((PSZ)sessionId.raw(), &mutex);
+    //APIRET arc = ::DosOpenMutexSem((PSZ)sessionId.raw(), &mutex);
+    APIRET arc = ::DosOpenMutexSem((PSZ)sessionId, &mutex);
     AssertMsg(arc == NO_ERROR, ("cannot open token, arc=%ld\n", arc));
 
     if (arc == NO_ERROR)
diff -urN vbox-trunk-bk\src\VBox\Main/src-client/ConsoleImpl2.cpp vbox-trunk\src\VBox\Main/src-client/ConsoleImpl2.cpp
--- vbox-trunk-bk\src\VBox\Main/src-client/ConsoleImpl2.cpp	2015-10-25 02:59:28.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-client/ConsoleImpl2.cpp	2015-10-24 21:21:12.000000000 +0300
@@ -2893,7 +2893,11 @@
             if (/* mode != ClipboardMode_Disabled */ true)
             {
                 /* Load the service */
+#ifndef RT_OS_OS2
                 rc = pVMMDev->hgcmLoadService("VBoxSharedClipboard", "VBoxSharedClipboard");
+#else
+                rc = pVMMDev->hgcmLoadService("VBoxSC", "VBoxSharedClipboard");
+#endif
                 if (RT_FAILURE(rc))
                 {
                     LogRel(("Shared clipboard is not available, rc=%Rrc\n", rc));
@@ -2927,7 +2931,11 @@
             if (   hrc   == S_OK
                 && value == "1")
             {
+#ifndef RT_OS_OS2
                 rc = pVMMDev->hgcmLoadService("VBoxHostChannel", "VBoxHostChannel");
+#else
+                rc = pVMMDev->hgcmLoadService("VBoxHC", "VBoxHostChannel");
+#endif
                 if (RT_FAILURE(rc))
                 {
                     LogRel(("VBoxHostChannel is not available, rc=%Rrc\n", rc));
@@ -2946,7 +2954,11 @@
             hrc = pMachine->COMGETTER(DnDMode)(&enmMode);                                   H();
 
             /* Load the service */
+#ifndef RT_OS_OS2
             rc = pVMMDev->hgcmLoadService("VBoxDragAndDropSvc", "VBoxDragAndDropSvc");
+#else
+            rc = pVMMDev->hgcmLoadService("VBoxDnD", "VBoxDragAndDropSvc");
+#endif
             if (RT_FAILURE(rc))
             {
                 LogRel(("Drag and drop service is not available, rc=%Rrc\n", rc));
@@ -5207,6 +5219,8 @@
 
 #elif defined(RT_OS_WINDOWS) /* not defined NetFlt */
             /* NOTHING TO DO HERE */
+#elif defined(RT_OS_OS2)
+            /* NOTHING TO DO HERE */
 #elif defined(RT_OS_LINUX)
 /// @todo aleksey: is there anything to be done here?
 #elif defined(RT_OS_FREEBSD)
@@ -5666,7 +5680,11 @@
     AssertReturn(pConsole->m_pVMMDev, VERR_INVALID_POINTER);
 
     /* Load the service */
+#ifndef RT_OS_OS2
     int rc = pConsole->m_pVMMDev->hgcmLoadService("VBoxGuestPropSvc", "VBoxGuestPropSvc");
+#else
+    int rc = pConsole->m_pVMMDev->hgcmLoadService("VBoxSIS", "VBoxGuestPropSvc");
+#endif
 
     if (RT_FAILURE(rc))
     {
@@ -5822,7 +5840,11 @@
     ComObjPtr<Console> pConsole = static_cast<Console *>(pvConsole);
 
     /* Load the service */
+#ifndef RT_OS_OS2
     int rc = pConsole->m_pVMMDev->hgcmLoadService("VBoxGuestControlSvc", "VBoxGuestControlSvc");
+#else
+    int rc = pConsole->m_pVMMDev->hgcmLoadService("VBoxSIS", "VBoxGuestControlSvc");
+#endif
 
     if (RT_FAILURE(rc))
     {
diff -urN vbox-trunk-bk\src\VBox\Main/src-client/SessionImpl.cpp vbox-trunk\src\VBox\Main/src-client/SessionImpl.cpp
--- vbox-trunk-bk\src\VBox\Main/src-client/SessionImpl.cpp	2015-10-25 02:59:28.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-client/SessionImpl.cpp	2015-10-30 21:40:06.000000000 +0300
@@ -297,7 +297,7 @@
 #endif
 }
 
-#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
+#if !defined(VBOX_WITH_GENERIC_SESSION_WATCHER) // && !defined(RT_OS_OS2)
 HRESULT Session::assignMachine(const ComPtr<IMachine> &aMachine,
                                LockType_T aLockType,
                                const com::Utf8Str &aTokenId)
@@ -348,7 +348,7 @@
     mRemoteMachine = aMachine;
 #endif
 
-#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
+#if !defined(VBOX_WITH_GENERIC_SESSION_WATCHER) // && !defined(RT_OS_OS2)
     Utf8Str strTokenId(aTokenId);
     Assert(!strTokenId.isEmpty());
 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */
@@ -357,7 +357,7 @@
     /* create the machine client token */
     try
     {
-#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
+#if !defined(VBOX_WITH_GENERIC_SESSION_WATCHER) // && !defined(RT_OS_OS2)
         mClientTokenHolder = new ClientTokenHolder(strTokenId);
 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */
         mClientTokenHolder = new ClientTokenHolder(aToken);
diff -urN vbox-trunk-bk\src\VBox\Main/src-server/ClientToken.cpp vbox-trunk\src\VBox\Main/src-server/ClientToken.cpp
--- vbox-trunk-bk\src\VBox\Main/src-server/ClientToken.cpp	2015-10-25 02:58:10.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-server/ClientToken.cpp	2015-10-30 21:41:40.000000000 +0300
@@ -49,7 +49,7 @@
 #if defined(RT_OS_WINDOWS)
     if (mClientToken)
         ::CloseHandle(mClientToken);
-#elif defined(RT_OS_OS2)
+#elif 0 // defined(RT_OS_OS2)
     if (mClientToken != NULLHANDLE)
         ::DosCloseMutexSem(mClientToken);
 #elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER)
@@ -87,7 +87,7 @@
     AssertMsg(mClientToken,
               ("Cannot create token '%s', err=%d",
                mClientTokenId.c_str(), ::GetLastError()));
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2)
     NOREF(pSessionMachine);
     Utf8Str ipcSem = Utf8StrFmt("\\SEM32\\VBOX\\VM\\{%RTuuid}",
                                 pMachine->mData->mUuid.raw());
@@ -228,7 +228,7 @@
     /* release the token */
     ::ReleaseMutex(mClientToken);
     terminated = true;
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2)
     AssertMsg(mClientToken, ("semaphore must be created"));
 
     /* release the token */
diff -urN vbox-trunk-bk\src\VBox\Main/src-server/ClientWatcher.cpp vbox-trunk\src\VBox\Main/src-server/ClientWatcher.cpp
--- vbox-trunk-bk\src\VBox\Main/src-server/ClientWatcher.cpp	2015-10-25 02:58:08.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-server/ClientWatcher.cpp	2015-10-30 22:14:42.000000000 +0300
@@ -85,7 +85,7 @@
 {
 #if defined(RT_OS_WINDOWS)
     mUpdateReq = ::CreateEvent(NULL, FALSE, FALSE, NULL);
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2)
     RTSemEventCreate(&mUpdateReq);
 #elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER) || defined(VBOX_WITH_GENERIC_SESSION_WATCHER)
     RTSemEventCreate(&mUpdateReq);
@@ -120,7 +120,7 @@
     /* sent an update request */
 #if defined(RT_OS_WINDOWS)
     ::SetEvent(mUpdateReq);
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2)
     RTSemEventSignal(mUpdateReq);
 #elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER)
     /* use short timeouts, as we expect changes */
@@ -329,7 +329,7 @@
 
     ::CoUninitialize();
 
-#elif defined(RT_OS_OS2)
+#elif 0 //defined(RT_OS_OS2)
 
     /// @todo (dmik) processes reaping!
 
@@ -477,6 +477,7 @@
                             {
                                 AutoReadLock smLock(sm COMMA_LOCKVAL_SRC_POS);
                                 ClientToken *ct = sm->i_getClientToken();
+                                //Machine::ClientToken *ct = sm->i_get();
                                 if (ct)
                                 {
                                     HMTX ipcSem = ct->getToken();
diff -urN vbox-trunk-bk\src\VBox\Main/src-server/HostNetworkInterfaceImpl.cpp vbox-trunk\src\VBox\Main/src-server/HostNetworkInterfaceImpl.cpp
--- vbox-trunk-bk\src\VBox\Main/src-server/HostNetworkInterfaceImpl.cpp	2015-10-25 02:58:06.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-server/HostNetworkInterfaceImpl.cpp	2015-10-14 00:45:28.000000000 +0300
@@ -27,7 +27,7 @@
 
 #include <iprt/cpp/utils.h>
 
-#ifdef RT_OS_FREEBSD
+#if defined(RT_OS_FREEBSD) || defined(RT_OS_OS2)
 # include <netinet/in.h> /* INADDR_NONE */
 #endif /* RT_OS_FREEBSD */
 
@@ -152,6 +152,11 @@
 
 #endif /* VBOX_WITH_RESOURCE_USAGE_API */
 
+Bstr HostNetworkInterface::i_composeNetworkName(const Utf8Str aShortName)
+{
+    return Utf8Str("HostInterfaceNetworking-").append(aShortName);
+}
+
 #ifdef VBOX_WITH_HOSTNETIF_API
 
 HRESULT HostNetworkInterface::updateConfig()
@@ -179,10 +184,12 @@
     return rc == VERR_NOT_IMPLEMENTED ? E_NOTIMPL : E_FAIL;
 }
 
+#if 0
 Bstr HostNetworkInterface::i_composeNetworkName(const Utf8Str aShortName)
 {
     return Utf8Str("HostInterfaceNetworking-").append(aShortName);
 }
+#endif
 /**
  * Initializes the host object.
  *
diff -urN vbox-trunk-bk\src\VBox\Main/src-server/MachineImpl.cpp vbox-trunk\src\VBox\Main/src-server/MachineImpl.cpp
--- vbox-trunk-bk\src\VBox\Main/src-server/MachineImpl.cpp	2015-10-25 02:58:12.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-server/MachineImpl.cpp	2015-10-30 21:45:04.000000000 +0300
@@ -3370,7 +3370,7 @@
             SessionState_T origState = mData->mSession.mState;
             mData->mSession.mState = SessionState_Spawning;
 
-#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
+#if !defined(VBOX_WITH_GENERIC_SESSION_WATCHER) // && !defined(RT_OS_OS2)
             /* Get the client token ID to be passed to the client process */
             Utf8Str strTokenId;
             sessionMachine->i_getTokenId(strTokenId);
@@ -3396,7 +3396,7 @@
             alock.release();
 
             LogFlowThisFunc(("Calling AssignMachine()...\n"));
-#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
+#if !defined(VBOX_WITH_GENERIC_SESSION_WATCHER) // && !defined(RT_OS_OS2)
             rc = pSessionControl->AssignMachine(sessionMachine, aLockType, Bstr(strTokenId).raw());
 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */
             rc = pSessionControl->AssignMachine(sessionMachine, aLockType, pToken);
@@ -7711,7 +7711,7 @@
 
         /* inform the session that it will be a remote one */
         LogFlowThisFunc(("Calling AssignMachine (NULL)...\n"));
-#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
+#if !defined(VBOX_WITH_GENERIC_SESSION_WATCHER) // && !defined(RT_OS_OS2)
         HRESULT rc = aControl->AssignMachine(NULL, LockType_Write, Bstr::Empty.raw());
 #else /* VBOX_WITH_GENERIC_SESSION_WATCHER */
         HRESULT rc = aControl->AssignMachine(NULL, LockType_Write, NULL);
@@ -13551,7 +13551,7 @@
 // public methods only for internal purposes
 /////////////////////////////////////////////////////////////////////////////
 
-#ifndef VBOX_WITH_GENERIC_SESSION_WATCHER
+#if !defined(VBOX_WITH_GENERIC_SESSION_WATCHER) // && !defined(RT_OS_OS2)
 /**
  * Called from the client watcher thread to check for expected or unexpected
  * death of the client process that has a direct session to this machine.
diff -urN vbox-trunk-bk\src\VBox\Main/src-server/os2/NetIf-os2.cpp vbox-trunk\src\VBox\Main/src-server/os2/NetIf-os2.cpp
--- vbox-trunk-bk\src\VBox\Main/src-server/os2/NetIf-os2.cpp	2015-10-25 02:58:10.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-server/os2/NetIf-os2.cpp	2015-10-30 21:46:10.000000000 +0300
@@ -22,6 +22,7 @@
 *********************************************************************************************************************************/
 #define LOG_GROUP LOG_GROUP_MAIN
 
+#include <VBox/com/defs.h>
 #include <iprt/err.h>
 #include <list>
 
@@ -33,12 +34,13 @@
     return VERR_NOT_IMPLEMENTED;
 }
 
-int NetIfEnableStaticIpConfig(VirtualBox *pVBox, HostNetworkInterface * pIf, ULONG ip, ULONG mask)
+int NetIfEnableStaticIpConfig(VirtualBox *vBox, HostNetworkInterface * pIf, ULONG aOldIp, ULONG ip, ULONG mask)
 {
     return VERR_NOT_IMPLEMENTED;
 }
 
-int NetIfEnableStaticIpConfigV6(VirtualBox *pVBox, HostNetworkInterface * pIf, IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
+int NetIfEnableStaticIpConfigV6(VirtualBox *vBox, HostNetworkInterface * pIf, IN_BSTR aOldIPV6Address,
+                                IN_BSTR aIPV6Address, ULONG aIPV6MaskPrefixLength)
 {
     return VERR_NOT_IMPLEMENTED;
 }
@@ -53,4 +55,34 @@
 {
     return VERR_NOT_IMPLEMENTED;
 }
+
+
+int NetIfGetState(const char *pcszIfName, NETIFSTATUS *penmState)
+{
+    return VERR_NOT_IMPLEMENTED;
+}
+
+int NetIfGetLinkSpeed(const char *pcszIfName, uint32_t *puMbits)
+{
+    return VERR_NOT_IMPLEMENTED;
+}
+
+int NetIfCreateHostOnlyNetworkInterface(VirtualBox *pVirtualBox,
+                                        IHostNetworkInterface **aHostNetworkInterface,
+                                        IProgress **aProgress,
+                                        const char *pcszName)
+{
+    return VERR_NOT_IMPLEMENTED;
+}
+
+int NetIfGetConfig(HostNetworkInterface * pIf, NETIFINFO *pInfo)
+{
+    return VERR_NOT_IMPLEMENTED;
+}
+
+int NetIfRemoveHostOnlyNetworkInterface(VirtualBox *pVirtualBox, IN_GUID aId,
+                                        IProgress **aProgress)
+{
+    return VERR_NOT_IMPLEMENTED;
+}
 
diff -urN vbox-trunk-bk\src\VBox\Main/src-server/os2/USBProxyServiceOs2.cpp vbox-trunk\src\VBox\Main/src-server/os2/USBProxyServiceOs2.cpp
--- vbox-trunk-bk\src\VBox\Main/src-server/os2/USBProxyServiceOs2.cpp	2015-10-25 02:58:10.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-server/os2/USBProxyServiceOs2.cpp	2015-10-24 22:11:56.000000000 +0300
@@ -251,7 +251,7 @@
         pCur->u64SerialHash = 0;
         //pCur->bNumConfigurations = pDevDesc->bNumConfigurations;
         pCur->bNumConfigurations = 0;
-        pCur->paConfigurations = NULL;
+        //pCur->paConfigurations = NULL; // vs: Now USBDEVICE format changed
         pCur->enmState = USBDEVICESTATE_USED_BY_HOST_CAPTURABLE;
         pCur->enmSpeed = USBDEVICESPEED_UNKNOWN;
         pCur->pszAddress = NULL;
@@ -259,12 +259,12 @@
                      pDevDesc->idProduct, pDevDesc->idVendor, pDevDesc->bcdDevice, i);
 
         pCur->bBus = 0;
-        pCur->bLevel = 0;
-        pCur->bDevNum = 0;
-        pCur->bDevNumParent = 0;
+        //pCur->bLevel = 0;
+        //pCur->bDevNum = 0;
+        //pCur->bDevNumParent = 0;
         pCur->bPort = 0;
-        pCur->bNumDevices = 0;
-        pCur->bMaxChildren = 0;
+        //pCur->bNumDevices = 0;
+        //pCur->bMaxChildren = 0;
 
         /* link it */
         pCur->pNext = NULL;
diff -urN vbox-trunk-bk\src\VBox\Main/src-server/xpcom/server_module.cpp vbox-trunk\src\VBox\Main/src-server/xpcom/server_module.cpp
--- vbox-trunk-bk\src\VBox\Main/src-server/xpcom/server_module.cpp	2015-10-25 02:58:02.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-server/xpcom/server_module.cpp	2015-10-14 00:45:28.000000000 +0300
@@ -118,7 +118,11 @@
     if (PR_ProcessAttrSetInheritableFD(attr, writable, VBOXSVC_STARTUP_PIPE_NAME) != PR_SUCCESS)
         goto end;
 
+#ifndef RT_OS_OS2
     devNull = PR_Open("/dev/null", PR_RDWR, 0);
+#else
+    devNull = PR_Open("/dev/nul", PR_RDWR, 0);
+#endif
     if (!devNull)
         goto end;
 
diff -urN vbox-trunk-bk\src\VBox\Main/src-server/xpcom/server.cpp vbox-trunk\src\VBox\Main/src-server/xpcom/server.cpp
--- vbox-trunk-bk\src\VBox\Main/src-server/xpcom/server.cpp	2015-10-25 02:58:02.000000000 +0300
+++ vbox-trunk\src\VBox\Main/src-server/xpcom/server.cpp	2015-10-14 00:45:28.000000000 +0300
@@ -629,7 +629,11 @@
     if (PR_ProcessAttrSetInheritableFD(attr, writable, VBOXSVC_STARTUP_PIPE_NAME) != PR_SUCCESS)
         goto end;
 
+#ifndef RT_OS_OS2
     devNull = PR_Open("/dev/null", PR_RDWR, 0);
+#else
+    devNull = PR_Open("/dev/nul", PR_RDWR, 0);
+#endif
     if (!devNull)
         goto end;
 
