VirtualBox

Changeset 86220 in vbox for trunk/src/VBox/Runtime/r3


Ignore:
Timestamp:
Sep 22, 2020 1:09:34 PM (4 years ago)
Author:
vboxsync
Message:

IPRT/RTTimeZoneGetCurrent: Some build systems might not have tzfile.h so define the needed constants manually.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/posix/RTTimeZoneGetCurrent-posix.cpp

    r86216 r86220  
    4242#include <iprt/stream.h>
    4343
    44 #include <tzfile.h>
     44#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
     45 #define TZDIR                   "/usr/share/zoneinfo"
     46 #define TZ_MAGIC                "TZif"
     47#else
     48 #include <tzfile.h>
     49#endif
    4550
    4651#define PATH_LOCALTIME           "/etc/localtime"
     
    8489    if (RT_SUCCESS(rc))
    8590    {
    86         char achTZBuf[sizeof(struct tzhead)];
     91        char achTZBuf[sizeof(TZ_MAGIC)];
    8792
    8893        rc = RTFileRead(hFile, achTZBuf, sizeof(achTZBuf), NULL);
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