VirtualBox

Ticket #15205: VirtualBox-5.0.16-glibc.patch

File VirtualBox-5.0.16-glibc.patch, 1.0 KB (added by sergiomb, 8 years ago)

replace readdir_r with readdir

  • VirtualBox-5.0.16/src/VBox/Runtime/r3/posix/dir-posix.cpp

    Released under the MIT license.
    Copied from 
    https://lists.freedesktop.org/archives/systemd-devel/2013-December/015734.html
    https://lists.freedesktop.org/archives/systemd-devel/2013-December/015732.html
    old new static int rtDirReadMore(PRTDIR pDir)  
    288288        if (!pDir->fDataUnread)
    289289        {
    290290            struct dirent *pResult = NULL;
    291             int rc = readdir_r(pDir->pDir, &pDir->Data, &pResult);
    292             if (rc)
     291            errno = 0;
     292            pResult = readdir(pDir->pDir);
     293            if (errno != 0)
    293294            {
    294                 rc = RTErrConvertFromErrno(rc);
     295                int rc = RTErrConvertFromErrno(errno);
    295296                /** @todo Consider translating ENOENT (The current
    296297                 *        position of the directory stream is invalid)
    297298                 *        differently. */

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy