mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
python: Ignore -Wcast-align warnings in Python 3.8 header files.
Disable this warning/error in the Python 3.8 header files:
In file included from /usr/include/python3.8/abstract.h:837,
from /usr/include/python3.8/Python.h:147,
from actions.h:31,
from actions-6.c:34:
/usr/include/python3.8/cpython/abstract.h: In function '_PyVectorcall_Function':
/usr/include/python3.8/cpython/abstract.h:91:11: error: cast increases required alignment of target type [-Werror=cast-align]
91 | ptr = (vectorcallfunc*)(((char *)callable) + offset);
| ^
This commit is contained in:
@@ -45,7 +45,11 @@ let rec generate_python_actions_h () =
|
||||
#include \"guestfs-utils.h\"
|
||||
|
||||
#define PY_SSIZE_T_CLEAN 1
|
||||
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored \"-Wcast-align\"
|
||||
#include <Python.h>
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#if PY_VERSION_HEX < 0x02050000
|
||||
typedef int Py_ssize_t;
|
||||
|
||||
Reference in New Issue
Block a user