Index: /trunk/src/VBox/Devices/Network/DrvTAP.cpp
===================================================================
--- /trunk/src/VBox/Devices/Network/DrvTAP.cpp	(revision 49597)
+++ /trunk/src/VBox/Devices/Network/DrvTAP.cpp	(revision 49598)
@@ -651,5 +651,5 @@
         LogRel(("TAP#%d: Failed to get interface flags after setting PPA. errno=%d\n", pThis->pDrvIns->iInstance, errno));
 
-#ifdef VBOX_SOLARIS_TAP_ARP
+# ifdef VBOX_SOLARIS_TAP_ARP
     /* Interface */
     if (ioctl(InterfaceFD, I_PUSH, "arp") == -1)
@@ -677,5 +677,5 @@
     if (ioctl(ARPFileDes, I_STR, &ioIF) == -1)
         LogRel(("TAP#%d: Failed to set interface name to ARP.\n", pThis->pDrvIns->iInstance));
-#endif
+# endif
 
     /* We must use I_LINK and not I_PLINK as I_PLINK makes the link persistent.
@@ -687,7 +687,7 @@
     {
         close(InterfaceFD);
-#ifdef VBOX_SOLARIS_TAP_ARP
+# ifdef VBOX_SOLARIS_TAP_ARP
         close(ARPFileDes);
-#endif
+# endif
         LogRel(("TAP#%d: Cannot link TAP device to IP.\n", pThis->pDrvIns->iInstance));
         return PDMDrvHlpVMSetError(pThis->pDrvIns, VERR_HOSTIF_IOCTL, RT_SRC_POS,
@@ -695,5 +695,5 @@
     }
 
-#ifdef VBOX_SOLARIS_TAP_ARP
+# ifdef VBOX_SOLARIS_TAP_ARP
     int ARPMuxID = ioctl(IPFileDes, I_LINK, ARPFileDes);
     if (ARPMuxID == -1)
@@ -701,5 +701,5 @@
 
     close(ARPFileDes);
-#endif
+# endif
     close(InterfaceFD);
 
@@ -708,13 +708,13 @@
     RTStrCopy(ifReq.lifr_name, sizeof(ifReq.lifr_name), pThis->pszDeviceName);
     ifReq.lifr_ip_muxid  = IPMuxID;
-#ifdef VBOX_SOLARIS_TAP_ARP
+# ifdef VBOX_SOLARIS_TAP_ARP
     ifReq.lifr_arp_muxid = ARPMuxID;
-#endif
+# endif
 
     if (ioctl(IPFileDes, SIOCSLIFMUXID, &ifReq) == -1)
     {
-#ifdef VBOX_SOLARIS_TAP_ARP
+# ifdef VBOX_SOLARIS_TAP_ARP
         ioctl(IPFileDes, I_PUNLINK, ARPMuxID);
-#endif
+# endif
         ioctl(IPFileDes, I_PUNLINK, IPMuxID);
         close(IPFileDes);
@@ -726,5 +726,5 @@
     int rc = RTFileFromNative(&pThis->hFileDevice, TapFileDes);
     AssertLogRelRC(rc);
-    if (RT_FAILURE(rc)))
+    if (RT_FAILURE(rc))
     {
         close(IPFileDes);
@@ -978,5 +978,5 @@
                                    N_("Configuration error: Failed to configure /dev/net/tun. errno=%d"), errno);
     /** @todo determine device name. This can be done by reading the link /proc/<pid>/fd/<fd> */
-    Log(("drvTAPContruct: %d (from fd)\n", pThis->hFileDevice));
+    Log(("drvTAPContruct: %d (from fd)\n", (intptr_t)pThis->hFileDevice));
     rc = VINF_SUCCESS;
 
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 49597)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl.cpp	(revision 49598)
@@ -8487,5 +8487,5 @@
             RTStrCopy(IfReq.ifr_name, sizeof(IfReq.ifr_name), str.c_str()); /** @todo bitch about names which are too long... */
             IfReq.ifr_flags = IFF_TAP | IFF_NO_PI;
-            rcVBox = ioctl(maTapFD[slot], TUNSETIFF, &IfReq);
+            rcVBox = ioctl(RTFileToNative(maTapFD[slot]), TUNSETIFF, &IfReq);
             if (rcVBox != 0)
             {
@@ -8501,5 +8501,5 @@
              * Make it pollable.
              */
-            if (fcntl(maTapFD[slot], F_SETFL, O_NONBLOCK) != -1)
+            if (fcntl(RTFileToNative(maTapFD[slot]), F_SETFL, O_NONBLOCK) != -1)
             {
                 Log(("attachToTapInterface: %RTfile %ls\n", maTapFD[slot], tapDeviceName.raw()));
Index: /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 49597)
+++ /trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp	(revision 49598)
@@ -4372,10 +4372,10 @@
                 }
 
-                Assert((int)maTapFD[uInstance] >= 0);
-                if ((int)maTapFD[uInstance] >= 0)
+                Assert((intptr_t)maTapFD[uInstance] >= 0);
+                if ((intptr_t)maTapFD[uInstance] >= 0)
                 {
                     InsertConfigString(pLunL0, "Driver", "HostInterface");
                     InsertConfigNode(pLunL0, "Config", &pCfg);
-                    InsertConfigInteger(pCfg, "FileHandle", maTapFD[uInstance]);
+                    InsertConfigInteger(pCfg, "FileHandle", (intptr_t)maTapFD[uInstance]);
                 }
 
@@ -4571,10 +4571,10 @@
                     }
 
-                    Assert((int)maTapFD[uInstance] >= 0);
-                    if ((int)maTapFD[uInstance] >= 0)
+                    Assert((intptr_t)maTapFD[uInstance] >= 0);
+                    if ((intptr_t)maTapFD[uInstance] >= 0)
                     {
                         InsertConfigString(pLunL0, "Driver", "HostInterface");
                         InsertConfigNode(pLunL0, "Config", &pCfg);
-                        InsertConfigInteger(pCfg, "FileHandle", maTapFD[uInstance]);
+                        InsertConfigInteger(pCfg, "FileHandle", (intptr_t)maTapFD[uInstance]);
                     }
                     break;
