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:
Christian Stimming 2006-03-10 09:36:43 +00:00
parent bbb6c5f1d4
commit a56a386318

View File

@ -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);
}