File: python311_ftbfs_fix.patch

package info (click to toggle)
collectd 5.12.0-26
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,816 kB
  • sloc: ansic: 120,844; perl: 20,684; php: 3,007; makefile: 2,441; java: 1,713; javascript: 920; python: 892; sh: 799; cpp: 638; yacc: 231; sql: 198; lex: 146; ruby: 49; xml: 44
file content (30 lines) | stat: -rw-r--r-- 923 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
commit 623e95394e0e62e7f9ced2104b786d21e9c0bf53
Author: Đoàn Trần Công Danh <congdanhqx@gmail.com>
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.

Index: collectd/src/cpython.h
===================================================================
--- collectd.orig/src/cpython.h
+++ collectd/src/cpython.h
@@ -24,9 +24,15 @@
  *   Sven Trenkel <collectd at semidefinite.de>
  **/
 
+#include <Python.h>
 /* 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 <longintrepr.h>
+#endif /* PY_VERSION_HEX < 0x030B0000 */
 
 /* These two macros are basically Py_BEGIN_ALLOW_THREADS and
  * Py_BEGIN_ALLOW_THREADS