chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / cc / cctools / 0003-Fix-utimensat-compatability-with-the-10.12-SDK.patch
blob4abe9ee863aa720ff80c335d844a7c00edf55745
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
6 ---
7 include/compat.h | 3 +++
8 libstuff/writeout.c | 2 +-
9 misc/lipo.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
14 new file mode 100644
15 index 0000000..8b1b866
16 --- /dev/null
17 +++ b/include/compat.h
18 @@ -0,0 +1,3 @@
19 +#pragma once
20 +#include <time.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(&times[0], &toc_timespec, sizeof(struct timespec));
34 memcpy(&times[1], &toc_timespec, sizeof(struct timespec));
35 diff --git a/misc/lipo.c b/misc/lipo.c
36 index 04a3eca..887c049 100644
37 --- a/misc/lipo.c
38 +++ b/misc/lipo.c
39 @@ -607,7 +607,7 @@ unknown_flag:
40 if(close(fd) == -1)
41 system_fatal("can't close output file: %s",output_file);
42 #ifndef __OPENSTEP__
43 - if (__builtin_available(macOS 10.12, *)) {
44 + if (__builtin_available(macOS 10.13, *)) {
45 time_result = utimensat(AT_FDCWD, output_file,
46 output_times, 0);
48 --
49 2.45.2