From: Collectd Packaging Team Date: Fri, 27 Jan 2023 08:08:10 +0000 (+0000) Subject: python311_ftbfs_fix X-Git-Tag: archive/raspbian/5.12.0-13+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=02301bef87c94fc0056c2c355a93838b6f559ffd;p=collectd.git python311_ftbfs_fix commit 623e95394e0e62e7f9ced2104b786d21e9c0bf53 Author: Đoàn Trần Công Danh Date: Wed Sep 21 22:21:58 2022 +0700 cpython: fix build with Python 3.11 Python 3.11 moves longintrepr.h into cpython sub-directory. However, in this version, longintrepr.h is always included. Gbp-Pq: Name python311_ftbfs_fix.patch --- diff --git a/src/cpython.h b/src/cpython.h index 11e64fa..bcfa406 100644 --- a/src/cpython.h +++ b/src/cpython.h @@ -24,9 +24,15 @@ * Sven Trenkel **/ +#include /* Some python versions don't include this by default. */ - +#if PY_VERSION_HEX < 0x030B0000 +/* + * Python 3.11 move longintrepr.h to cpython/longintrepr.h + * And it's always included + */ #include +#endif /* PY_VERSION_HEX < 0x030B0000 */ /* These two macros are basically Py_BEGIN_ALLOW_THREADS and * Py_BEGIN_ALLOW_THREADS