VirtualBox

Ignore:
Timestamp:
Mar 16, 2012 4:38:06 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
76890
Message:

Solaris 11 build fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxUSB/solaris/USBLib-solaris.cpp

    r39374 r40504  
    5757static uint32_t volatile g_cUsers = 0;
    5858/** VBoxUSB Device handle. */
    59 static RTFILE g_File = NIL_RTFILE;
     59static RTFILE g_hFile = NIL_RTFILE;
    6060/** List of tasks handled by the USB helper. */
    6161typedef enum USBHELPER_OP
     
    9393        return rc;
    9494    }
    95     g_File = File;
     95    g_hFile = File;
    9696
    9797    ASMAtomicIncU32(&g_cUsers);
     
    112112
    113113            RTFileClose(File);
    114             g_File = NIL_RTFILE;
     114            g_hFile = NIL_RTFILE;
    115115            ASMAtomicDecU32(&g_cUsers);
    116116            return rc;
     
    121121        LogRel((USBLIBR3 ":USBMonitor driver version query failed. rc=%Rrc\n", rc));
    122122        RTFileClose(File);
    123         g_File = NIL_RTFILE;
     123        g_hFile = NIL_RTFILE;
    124124        ASMAtomicDecU32(&g_cUsers);
    125125        return rc;
     
    142142     * We're the last guy, close down the connection.
    143143     */
    144     RTFILE File = g_File;
    145     g_File = NIL_RTFILE;
     144    RTFILE File = g_hFile;
     145    g_hFile = NIL_RTFILE;
    146146    if (File == NIL_RTFILE)
    147147        return VERR_INTERNAL_ERROR;
     
    238238static int usblibDoIOCtl(unsigned iFunction, void *pvData, size_t cbData)
    239239{
    240     if (g_File == NIL_RTFILE)
     240    if (g_hFile == NIL_RTFILE)
    241241    {
    242242        LogRel((USBLIBR3 ":IOCtl failed, device not open.\n"));
     
    249249    Hdr.pvDataR3 = pvData;
    250250
    251     int rc = ioctl((int)g_File, iFunction, &Hdr);
     251    int rc = ioctl(RTFileToNative(g_hFile), iFunction, &Hdr);
    252252    if (rc < 0)
    253253    {
    254254        rc = errno;
    255         LogRel((USBLIBR3 ":IOCtl failed iFunction=%x errno=%d g_file=%d\n", iFunction, rc, (int)g_File));
     255        LogRel((USBLIBR3 ":IOCtl failed iFunction=%x errno=%d g_file=%d\n", iFunction, rc, RTFileToNative(g_hFile)));
    256256        return RTErrConvertFromErrno(rc);
    257257    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette