Ticket #16545: patch-enotsup.diff

File patch-enotsup.diff, 1.1 KB (added by bzbarsky (Boris Zbarsky), 16 years ago)

This fixes the problem. It applies on top of the patch in http://bugzilla.gnome.org/show_bug.cgi?id=549595

  • src/backend/file/gnc-backend-file.c

    gnc_file_be_get_file_lock (FileBackend * 
    143143    rc = link (be->lockfile, pathbuf);
    144144    if (rc)
    145145    {
    146146        /* If hard links aren't supported, just allow the lock. */
    147147        if (errno == EPERM
    148148# ifdef EOPNOTSUPP
    149149            || errno == EOPNOTSUPP
    150150# endif
     151# ifdef ENOTSUP
     152            || errno == ENOTSUP
     153# endif
    151154            )
    152155        {
    153156            be->linkfile = NULL;
    154157            return TRUE;
    155158        }
    156159
    157160        /* Otherwise, something else is wrong. */
    158161        qof_backend_set_error ((QofBackend*)be, ERR_BACKEND_LOCKED);
    gnc_int_link_or_make_backup(FileBackend  
    404407      ;
    405408    if(err_ret != 0)
    406409    {
    407410#ifdef HAVE_LINK
    408411        if(errno == EPERM
    409412# ifdef EOPNOTSUPP
    410413           || errno == EOPNOTSUPP
    411414# endif
     415# ifdef ENOTSUP
     416           || errno == ENOTSUP
     417# endif
    412418# ifdef ENOSYS   // catches http://bugzilla.gnome.org/show_bug.cgi?id=549595
    413419           || errno == ENOSYS
    414420# endif
    415421           )
    416422#endif
    417423        {
    418424            copy_success = copy_file(orig, bkup);
    419425        }