From eca1ea2bc01d0bdf73cc406d35dcb16622d401a5 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 19 Jul 2026 18:06:48 +0300 Subject: [PATCH] gh-154144: Fix false positive from the stdbool.h guard in _testcapimodule.c (GH-154145) (cherry picked from commit 8d11eb0c31efcfd1d504650a564d9a4b45cba721) Co-authored-by: Serhiy Storchaka Co-authored-by: Claude Fable 5 --- .../Tests/2026-07-19-18-20-00.gh-issue-154144.tcbool.rst | 1 + Modules/_testcapimodule.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2026-07-19-18-20-00.gh-issue-154144.tcbool.rst diff --git a/Misc/NEWS.d/next/Tests/2026-07-19-18-20-00.gh-issue-154144.tcbool.rst b/Misc/NEWS.d/next/Tests/2026-07-19-18-20-00.gh-issue-154144.tcbool.rst new file mode 100644 index 000000000000000..dc1ac8b4035153c --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2026-07-19-18-20-00.gh-issue-154144.tcbool.rst @@ -0,0 +1 @@ +Fix building the :mod:`!_testcapi` module on NetBSD. diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 799390c27053287..fb18a866e628128 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -15,6 +15,10 @@ #include "frameobject.h" // PyFrame_New() #include "marshal.h" // PyMarshal_WriteLongToFile() +#ifdef bool +# error "The public headers should not include , see gh-90904" +#endif + #include // FLT_MAX #include #include // offsetof() @@ -26,10 +30,6 @@ # include // sysctlbyname() #endif -#ifdef bool -# error "The public headers should not include , see gh-48924" -#endif - #include "_testcapi/util.h"