From 2d8a7cee9c9caff2a380bf0de1abb002d95efd8c Mon Sep 17 00:00:00 2001 From: samypr100 <3933065+samypr100@users.noreply.github.com> Date: Tue, 25 Oct 2022 14:42:10 -0400 Subject: [PATCH 1/2] Fix #ifdef in sha3module.c * Test if HAVE_ALIGNED_REQUIRED is defined, not its value. * Partial Cherry Pick from 10a84ff --- Modules/_sha3/sha3module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_sha3/sha3module.c b/Modules/_sha3/sha3module.c index 3974e0b6b47faa..a2f9d8c75467ae 100644 --- a/Modules/_sha3/sha3module.c +++ b/Modules/_sha3/sha3module.c @@ -65,7 +65,7 @@ #endif /* Prevent bus errors on platforms requiring aligned accesses such ARM. */ -#if HAVE_ALIGNED_REQUIRED && !defined(NO_MISALIGNED_ACCESSES) +#if defined(HAVE_ALIGNED_REQUIRED) && !defined(NO_MISALIGNED_ACCESSES) #define NO_MISALIGNED_ACCESSES #endif From 01b7503d07431ed36914c8511e82d6961d4a3db5 Mon Sep 17 00:00:00 2001 From: samypr100 <3933065+samypr100@users.noreply.github.com> Date: Tue, 25 Oct 2022 14:43:00 -0400 Subject: [PATCH 2/2] Adding news entry --- .../next/Build/2022-10-25-14-43-00.gh-issue-98671.a42a6d.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2022-10-25-14-43-00.gh-issue-98671.a42a6d.rst diff --git a/Misc/NEWS.d/next/Build/2022-10-25-14-43-00.gh-issue-98671.a42a6d.rst b/Misc/NEWS.d/next/Build/2022-10-25-14-43-00.gh-issue-98671.a42a6d.rst new file mode 100644 index 00000000000000..54b78ed9f2e6f8 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2022-10-25-14-43-00.gh-issue-98671.a42a6d.rst @@ -0,0 +1,3 @@ +Fix ``NO_MISALIGNED_ACCESSES`` being not defined for the SHA3 extension +when ``HAVE_ALIGNED_REQUIRED`` is set. Allowing builds on hardware that +unaligned memory accesses are not allowed.