mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 15:43:49 +02:00
rdiff-backup: fix build with Python 3.11
This commit is contained in:
parent
2808e9ddd7
commit
dba4417e2e
1 changed files with 16 additions and 0 deletions
16
srcpkgs/rdiff-backup/patches/python-3.11.patch
Normal file
16
srcpkgs/rdiff-backup/patches/python-3.11.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
--- a/src/_librsyncmodule.c
|
||||||
|
+++ b/src/_librsyncmodule.c
|
||||||
|
@@ -540,8 +540,13 @@ PyMODINIT_FUNC PyInit__librsync(void)
|
||||||
|
{
|
||||||
|
PyObject *m, *d;
|
||||||
|
|
||||||
|
+#if PY_VERSION_HEX >= 0x03090000
|
||||||
|
+ Py_SET_TYPE(&_librsync_SigMakerType, &PyType_Type);
|
||||||
|
+ Py_SET_TYPE(&_librsync_DeltaMakerType, &PyType_Type);
|
||||||
|
+#else
|
||||||
|
Py_TYPE(&_librsync_SigMakerType) = &PyType_Type;
|
||||||
|
Py_TYPE(&_librsync_DeltaMakerType) = &PyType_Type;
|
||||||
|
+#endif
|
||||||
|
static struct PyModuleDef librsync_def = {
|
||||||
|
PyModuleDef_HEAD_INIT, "_librsync", "RSync Lib", -1, _librsyncMethods, };
|
||||||
|
m = PyModule_Create(&librsync_def);
|
Loading…
Add table
Reference in a new issue