mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
compiler/clc: fix compiler issue on MacOS with st_mtim[e] in stat.
MacOSs 'sys/stat.h' version of 'stat' doe snot have the 'st_mtim' that is used on other systems. The change allows MacOS to use 'st_mtime' without affecting the behaviour on any other platform. Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28130>
This commit is contained in:
parent
6146a1651a
commit
8387deff87
1 changed files with 4 additions and 0 deletions
|
|
@ -124,7 +124,11 @@ open_clc_data(struct clc_data *clc, unsigned ptr_bit_size)
|
|||
struct mesa_sha1 ctx;
|
||||
_mesa_sha1_init(&ctx);
|
||||
_mesa_sha1_update(&ctx, clc->file->sys_path, strlen(clc->file->sys_path));
|
||||
#if defined(__APPLE__) || defined(__MACOSX)
|
||||
_mesa_sha1_update(&ctx, &stat.st_mtime, sizeof(stat.st_mtime));
|
||||
#else
|
||||
_mesa_sha1_update(&ctx, &stat.st_mtim, sizeof(stat.st_mtim));
|
||||
#endif
|
||||
_mesa_sha1_final(&ctx, clc->cache_key);
|
||||
|
||||
clc->fd = fd;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue