Changeset 3357


Ignore:
Timestamp:
May 7, 2007, 5:19:50 AM (18 years ago)
Author:
bird
Message:

Workaround for kLIBC buf #163.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/essentials/app-arch/tar/src/misc.c

    r3342 r3357  
    359359  switch (errno)
    360360    {
     361#if defined __KLIBC__ /* Workaround for kLIBC bug #163. */
     362# if __KLIBC_VERSION__ <= 0x60002
     363    case ENOENT:
     364      {
     365        struct stat s;
     366        if (   lstat (file_name, &s) != 0
     367            || S_ISDIR (s.st_mode) /* paranoia */)
     368          {
     369            errno = ENOENT;
     370            break;
     371          }
     372        errno = ENOTDIR;
     373        /* fall thru */
     374      }
     375# endif
     376#endif
    361377    case ENOTDIR:
    362378      return !try_unlink_first && unlink (file_name) == 0;
Note: See TracChangeset for help on using the changeset viewer.