From: samypr100 <3933065+samypr100@users.noreply.github.com> Date: Fri, 28 Oct 2022 10:13:44 +0000 (-0400) Subject: [3.10] GH-98671: bpo-46670: Fix #ifdef in sha3module.c (GH-90828) (#98677) X-Git-Tag: v3.10.9~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af204e4c47babdefb307b3f25eb152732c73a533;p=thirdparty%2FPython%2Fcpython.git [3.10] GH-98671: bpo-46670: Fix #ifdef in sha3module.c (GH-90828) (#98677) --- 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 000000000000..54b78ed9f2e6 --- /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. diff --git a/Modules/_sha3/sha3module.c b/Modules/_sha3/sha3module.c index 3974e0b6b47f..a2f9d8c75467 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