VirtualBox

Changeset 77754 in vbox


Ignore:
Timestamp:
Mar 18, 2019 12:23:18 PM (6 years ago)
Author:
vboxsync
Message:

IPRT: Some st_birthtime experimentation for FreeBSD.

Location:
trunk/src/VBox/Runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/include/internal/fs.h

    r77231 r77754  
    3535# include <sys/stat.h>
    3636#endif
     37#ifdef RT_OS_FREEBSD
     38# include <osreldate.h>
     39#endif
    3740
    3841RT_C_DECLS_BEGIN
     
    6568#endif
    6669
     70#ifdef RT_OS_FREEBSD
     71# if __FreeBSD_version >= 500000 /* 5.0 */
     72#  define HAVE_STAT_BIRTHTIME
     73# endif
     74# if __FreeBSD_version >= 900000 /* 9.0 */
     75#  define HAVE_STAT_TIMESPEC_BRIEF
     76# else
     77#  ifndef __BSD_VISIBLE
     78#   define __BSD_VISIBLE
     79#  endif
     80#  define HAVE_STAT_TIMESPEC
     81# endif
     82#endif
     83
    6784RT_C_DECLS_END
    6885
  • trunk/src/VBox/Runtime/r3/posix/fs2-posix.cpp

    r76553 r77754  
    6565    RTTimeSpecAddNano(RTTimeSpecSetSeconds(&pObjInfo->ModificationTime, pStat->st_mtime),     pStat->st_mtimensec);
    6666    RTTimeSpecAddNano(RTTimeSpecSetSeconds(&pObjInfo->ChangeTime,       pStat->st_ctime),     pStat->st_ctimensec);
    67 #ifdef HAVE_STAT_BIRTHTIME
     67# ifdef HAVE_STAT_BIRTHTIME
    6868    RTTimeSpecAddNano(RTTimeSpecSetSeconds(&pObjInfo->BirthTime,        pStat->st_birthtime), pStat->st_birthtimensec);
    69 #endif
     69# endif
    7070
    7171#elif defined(HAVE_STAT_TIMESPEC_BRIEF)
     
    9696    pObjInfo->BirthTime = pObjInfo->ChangeTime;
    9797#endif
    98 
    9998
    10099    /* the file mode */
Note: See TracChangeset for help on using the changeset viewer.

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