]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr: Define PY_SSIZE_T_CLEAN ahead of every Python.h 47616/head
authorPete Zaitcev <zaitcev@redhat.com>
Wed, 15 Dec 2021 05:04:34 +0000 (23:04 -0600)
committerKefu Chai <tchaikov@gmail.com>
Tue, 16 Aug 2022 08:17:05 +0000 (16:17 +0800)
commit88bd7377006f8d7c8164a941ceb303629335294c
tree8d9ef0bd2722040011027f576a6eb81effc16967
parente6fcb4dc981b8c34b675acc3660b2ecfc5e39be4
mgr: Define PY_SSIZE_T_CLEAN ahead of every Python.h

Building on Fedora 35 with Python 3.10 makes vstart to loop
forever, throwing the following message:

 Error EINVAL: SystemError: PY_SSIZE_T_CLEAN macro must be
 defined for '#' formats

I followed the hint in the following document:
 https://docs.python.org/3/c-api/intro.html

It says "recommended" to always define PY_SSIZE_T_CLEAN,
but as you can see it is actually required in our case.

Fixes: https://tracker.ceph.com/issues/53441
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
(cherry picked from commit 389054888f2aa782f73564125ec7a1ef0212d536)
src/mgr/CMakeLists.txt