diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-09-20 00:18:01 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-09-28 16:41:02 +0200 |
commit | a9894926013289c89c784d6c3f521c76094f3d56 (patch) | |
tree | e08a943028b8ab63cc9985012c3c0c01465b94c5 /external/python3 | |
parent | connectx() is available only on Mac OS X 10.11 and newer (diff) | |
download | core-a9894926013289c89c784d6c3f521c76094f3d56.tar.gz core-a9894926013289c89c784d6c3f521c76094f3d56.zip |
Avoid API present from macOS 10.13 if building to run on older
utimensat() and futimens() are new in 10.13.
Change-Id: If0828388607069c8249a45c05fa4ed872f8ec51d
Reviewed-on: https://gerrit.libreoffice.org/42874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 42b8e2e5a76a310c7cf0f29379fe33b52127d16f)
Diffstat (limited to 'external/python3')
-rw-r--r-- | external/python3/UnpackedTarball_python3.mk | 8 | ||||
-rw-r--r-- | external/python3/python3-osx-avoid-new-10.13.patch.1 | 61 |
2 files changed, 69 insertions, 0 deletions
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk index 20192af318bf..423dc3e0b31f 100644 --- a/external/python3/UnpackedTarball_python3.mk +++ b/external/python3/UnpackedTarball_python3.mk @@ -47,4 +47,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3, \ )) endif +ifeq ($(OS),MACOSX) +ifneq ($(filter 1080 1090 101000 101100 101200,$(MAC_OS_X_VERSION_MIN_REQUIRED)),) +$(eval $(call gb_UnpackedTarball_add_patches,python3,\ + external/python3/python3-osx-avoid-new-10.13.patch.1 \ +)) +endif +endif + # vim: set noet sw=4 ts=4: diff --git a/external/python3/python3-osx-avoid-new-10.13.patch.1 b/external/python3/python3-osx-avoid-new-10.13.patch.1 new file mode 100644 index 000000000000..93bf5a078e01 --- /dev/null +++ b/external/python3/python3-osx-avoid-new-10.13.patch.1 @@ -0,0 +1,61 @@ +-*- Mode: Diff -*- + +--- python3/Modules/posixmodule.c ++++ python3/Modules/posixmodule.c +@@ -4565,12 +4565,12 @@ + } \ + + +-#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT) ++#if defined(HAVE_FUTIMESAT) + + static int + utime_dir_fd(utime_t *ut, int dir_fd, char *path, int follow_symlinks) + { +-#ifdef HAVE_UTIMENSAT ++#if 0 + int flags = follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW; + UTIME_TO_TIMESPEC; + return utimensat(dir_fd, path, time, flags); +@@ -4591,12 +4591,12 @@ + #define FUTIMENSAT_DIR_FD_CONVERTER dir_fd_unavailable + #endif + +-#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMENS) ++#if defined(HAVE_FUTIMES) + + static int + utime_fd(utime_t *ut, int fd) + { +-#ifdef HAVE_FUTIMENS ++#if 0 + UTIME_TO_TIMESPEC; + return futimens(fd, time); + #else +@@ -4619,7 +4619,7 @@ + static int + utime_nofollow_symlinks(utime_t *ut, char *path) + { +-#ifdef HAVE_UTIMENSAT ++#if 0 + UTIME_TO_TIMESPEC; + return utimensat(DEFAULT_DIR_FD, path, time, AT_SYMLINK_NOFOLLOW); + #else +@@ -4635,7 +4635,7 @@ + static int + utime_default(utime_t *ut, char *path) + { +-#ifdef HAVE_UTIMENSAT ++#if 0 + UTIME_TO_TIMESPEC; + return utimensat(DEFAULT_DIR_FD, path, time, 0); + #elif defined(HAVE_UTIMES) +@@ -4836,7 +4836,7 @@ + else + #endif + +-#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT) ++#if defined(HAVE_FUTIMESAT) + if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks)) + result = utime_dir_fd(&utime, dir_fd, path->narrow, follow_symlinks); + else |