mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Check for errno macro EOPNOTSUPP only if it is defined
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13578 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
bbb6c5f1d4
commit
a56a386318
@ -129,7 +129,11 @@ gnc_file_be_get_file_lock (FileBackend *be)
|
||||
if (rc)
|
||||
{
|
||||
/* If hard links aren't supported, just allow the lock. */
|
||||
if (errno == EOPNOTSUPP || errno == EPERM)
|
||||
if (errno == EPERM
|
||||
#ifdef EOPNOTSUPP
|
||||
|| errno == EOPNOTSUPP
|
||||
#endif
|
||||
)
|
||||
{
|
||||
be->linkfile = NULL;
|
||||
return TRUE;
|
||||
@ -336,7 +340,11 @@ gnc_int_link_or_make_backup(FileBackend *be, const char *orig, const char *bkup)
|
||||
int err_ret = link(orig, bkup);
|
||||
if(err_ret != 0)
|
||||
{
|
||||
if(errno == EPERM || errno == EOPNOTSUPP)
|
||||
if(errno == EPERM
|
||||
#ifdef EOPNOTSUPP
|
||||
|| errno == EOPNOTSUPP
|
||||
#endif
|
||||
)
|
||||
{
|
||||
err_ret = copy_file(orig, bkup);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user