aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/archive_platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/archive_platform.h')
-rw-r--r--libarchive/archive_platform.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libarchive/archive_platform.h b/libarchive/archive_platform.h
index 34be8edaa57d..8bd54a6962d5 100644
--- a/libarchive/archive_platform.h
+++ b/libarchive/archive_platform.h
@@ -52,6 +52,17 @@
#error Oops: No config.h and no pre-built configuration in archive_platform.h.
#endif
+/* On macOS check for some symbols based on the deployment target version. */
+#if defined(__APPLE__)
+# undef HAVE_FUTIMENS
+# undef HAVE_UTIMENSAT
+# include <AvailabilityMacros.h>
+# if MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
+# define HAVE_FUTIMENS 1
+# define HAVE_UTIMENSAT 1
+# endif
+#endif
+
/* It should be possible to get rid of this by extending the feature-test
* macros to cover Windows API functions, probably along with non-trivial
* refactoring of code to find structures that sit more cleanly on top of