We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a2b282 commit 1b184c8Copy full SHA for 1b184c8
Include/pymacro.h
@@ -1,6 +1,15 @@
1
#ifndef Py_PYMACRO_H
2
#define Py_PYMACRO_H
3
4
+// gh-91782: On FreeBSD 12, if the _POSIX_C_SOURCE and _XOPEN_SOURCE macros are
5
+// defined, <sys/cdefs.h> disables C11 support and <assert.h> does not define
6
+// the static_assert() macro. Define the static_assert() macro in Python until
7
+// <sys/cdefs.h> suports C11:
8
+// https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255290
9
+#if defined(__FreeBSD__) && !defined(static_assert)
10
+# define static_assert _Static_assert
11
+#endif
12
+
13
/* Minimum value between x and y */
14
#define Py_MIN(x, y) (((x) > (y)) ? (y) : (x))
15
0 commit comments