diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 5317ef229041fa0d16b88aaa3ebff9cf8b6f8678..a9f2d7e1204d1655b14b99cafb06d08d5046d8a6 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c @@ -8,6 +8,11 @@ #include "cpumap.h" #include "thread_map.h" +/* Define PyVarObject_HEAD_INIT for python 2.5 */ +#ifndef PyVarObject_HEAD_INIT +# define PyVarObject_HEAD_INIT(type, size) PyObject_HEAD_INIT(type) size, +#endif + struct throttle_event { struct perf_event_header header; u64 time;