mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
glocalfileinfo: Fix use of fstatat() on macOS < 10.10
`g_local_file_fstatat()` needs to fall back to returning an error if `fstatat()` isn’t defined, which is the case on older versions of macOS (as well as Windows, which was already handled). Callers shouldn’t call `g_local_file_fstatat()` in these cases. (That’s already the case.) Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2203
This commit is contained in:
parent
5017de6567
commit
74756a87fa
@ -236,12 +236,12 @@ g_local_file_fstatat (int fd,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#if !defined(G_OS_WIN32) && defined(AT_FDCWD)
|
||||||
/* Currently not supported on Windows */
|
return fstatat (fd, path, stat_buf, flags);
|
||||||
|
#else
|
||||||
|
/* Currently not supported on Windows or macOS < 10.10 */
|
||||||
errno = ENOSYS;
|
errno = ENOSYS;
|
||||||
return -1;
|
return -1;
|
||||||
#else
|
|
||||||
return fstatat (fd, path, stat_buf, flags);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user