]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98705: Fix AIX build by undefining `__bool__` in C (#98768)
authorAyappan Perumal <ayappap2@in.ibm.com>
Thu, 2 Feb 2023 20:32:33 +0000 (02:02 +0530)
committerGitHub <noreply@github.com>
Thu, 2 Feb 2023 20:32:33 +0000 (12:32 -0800)
Include/pyport.h
Misc/NEWS.d/next/Build/2022-10-27-09-57-12.gh-issue-98705.H11XmR.rst [new file with mode: 0644]

index b1b2a74779691d462511a229c81626f2036938c6..22085049a3048785cf38ee6b4170ffcb0686f3fa 100644 (file)
@@ -726,4 +726,10 @@ extern char * _getpty(int *, int, mode_t, int);
 #  endif
 #endif
 
+
+/* AIX has __bool__ redefined in it's system header file. */
+#if defined(_AIX) && defined(__bool__)
+#undef __bool__
+#endif
+
 #endif /* Py_PYPORT_H */
diff --git a/Misc/NEWS.d/next/Build/2022-10-27-09-57-12.gh-issue-98705.H11XmR.rst b/Misc/NEWS.d/next/Build/2022-10-27-09-57-12.gh-issue-98705.H11XmR.rst
new file mode 100644 (file)
index 0000000..4519853
--- /dev/null
@@ -0,0 +1,2 @@
+``__bool__`` is defined in AIX system header files which breaks the build in
+AIX, so undefine it.