VirtualBox

Changeset 3072 in kBuild


Ignore:
Timestamp:
Oct 2, 2017 8:33:39 AM (7 years ago)
Author:
bird
Message:

touch: solaris 10 build fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/touch.c

    r3060 r3072  
    168168
    169169
     170#if K_OS == K_OS_SOLARIS
     171/**
     172 * Solaris doesn't have lutimes because System V doesn't believe in stuff like file modes on symbolic links.
     173 */
     174static int lutimes(const char *pszFile, struct timeval aTimes[2])
     175{
     176    struct stat Stat;
     177    if (stat(pszFile, &Stat) != -1)
     178    {
     179        if (!S_ISLNK(Stat.st_mode))
     180            return utimes(pszFile, aTimes);
     181        return 0;
     182    }
     183    return -1;
     184}
     185#endif
     186
     187
    170188/**
    171189 * Parses adjustment value: [-][[hh]mm]SS
     
    328346    if (ExpTime.tm_isdst == 0)
    329347    {
     348#if K_OS == K_OS_SOLARIS
     349        pDst->tv_sec = mktime(&ExpTime) - timezone; /* best we can do for now */
     350#else
    330351        pDst->tv_sec = timegm(&ExpTime);
     352#endif
    331353        if (pDst->tv_sec == -1)
    332354            return touch_error("timegm failed on '%s': %s", pszTs, strerror(errno));
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