1 From 989ba5e30cefa0dd8990da158661713c4a21c0fe Mon Sep 17 00:00:00 2001
2 From: Randy Eckenrode <randy@largeandhighquality.com>
3 Date: Thu, 11 Apr 2024 18:05:34 -0400
4 Subject: [PATCH 3/6] Fix utimensat compatability with the 10.12 SDK
7 include/compat.h | 3 +++
8 libstuff/writeout.c | 2 +-
10 3 files changed, 5 insertions(+), 2 deletions(-)
11 create mode 100644 include/compat.h
13 diff --git a/include/compat.h b/include/compat.h
15 index 0000000..8b1b866
17 +++ b/include/compat.h
21 +extern int utimensat(int dirfd, const char* pathname, const struct timespec times[_Nullable 2], int flags);
22 diff --git a/libstuff/writeout.c b/libstuff/writeout.c
23 index f904caa..03fa535 100644
24 --- a/libstuff/writeout.c
25 +++ b/libstuff/writeout.c
26 @@ -297,7 +297,7 @@ no_throttle:
27 * have been zeroed out when the library was created. writeout
28 * will not zero out the modification time in the filesystem.
30 - if (__builtin_available(macOS 10.12, *)) {
31 + if (__builtin_available(macOS 10.13, *)) {
32 struct timespec times[2] = {0};
33 memcpy(×[0], &toc_timespec, sizeof(struct timespec));
34 memcpy(×[1], &toc_timespec, sizeof(struct timespec));
35 diff --git a/misc/lipo.c b/misc/lipo.c
36 index 04a3eca..887c049 100644
39 @@ -607,7 +607,7 @@ unknown_flag:
41 system_fatal("can't close output file: %s",output_file);
43 - if (__builtin_available(macOS 10.12, *)) {
44 + if (__builtin_available(macOS 10.13, *)) {
45 time_result = utimensat(AT_FDCWD, output_file,