aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2021-02-17 21:28:24 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-02-17 21:28:24 +0000
commitf8c371f446b76827180583700848088fb55d0e02 (patch)
tree80215366c89f20b888129df59f717d54b43ad133
parentacc5b88bee970ffb9abf62d2cfa4d08b1d75262e (diff)
parent4ec8900d9eaf12b57d2b512f39e4c8dd168f144e (diff)
downloadcpython3-f8c371f446b76827180583700848088fb55d0e02.tar.gz
Disable getentropy on Mac to support 10.10 am: d948d44e88 am: 687d294996 am: 7896ad86c9 am: 4ec8900d9e
Original change: https://android-review.googlesource.com/c/platform/external/python/cpython3/+/1590982 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ibe6565e1cda3c654ad2155e3780beccebf035a83
-rw-r--r--android/darwin_x86_64/pyconfig/pyconfig.h2
-rwxr-xr-xandroid/regen.sh2
2 files changed, 3 insertions, 1 deletions
diff --git a/android/darwin_x86_64/pyconfig/pyconfig.h b/android/darwin_x86_64/pyconfig/pyconfig.h
index 30b9b466c4..4deb9a07b5 100644
--- a/android/darwin_x86_64/pyconfig/pyconfig.h
+++ b/android/darwin_x86_64/pyconfig/pyconfig.h
@@ -425,7 +425,7 @@
#define HAVE_GETC_UNLOCKED 1
/* Define to 1 if you have the `getentropy' function. */
-#define HAVE_GETENTROPY 1
+/* #undef HAVE_GETENTROPY */
/* Define to 1 if you have the `getgrgid_r' function. */
#define HAVE_GETGRGID_R 1
diff --git a/android/regen.sh b/android/regen.sh
index 0145ff1210..1c0e235c33 100755
--- a/android/regen.sh
+++ b/android/regen.sh
@@ -39,6 +39,8 @@ cd tmp
../../../configure
if [ $DIR == "darwin_x86_64" ]; then
+ # getentropy is not safe on <10.12, which we still target
+ sed -ibak "s%#define HAVE_GETENTROPY 1%/* #undef HAVE_GETENTROPY */%" pyconfig.h
# utimensat and futimens are not safe on <10.13, which we still target
sed -ibak "s%#define HAVE_UTIMENSAT 1%/* #undef HAVE_UTIMENSAT */%" pyconfig.h
sed -ibak "s%#define HAVE_FUTIMENS 1%/* #undef HAVE_FUTIMENS */%" pyconfig.h