You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add missing <stddef.h> to included files in Modules/zlibmodule.c
Recent CI builds are failing because the `offsetof` function in
`Modules/zlibmodule.c` cannot be called. For example, see
https://buildbot.python.org/all/#/builders/15/builds/5217/steps/4/logs/stdio
from commit fabcbe9. Here is a relevant
snippet from the stdio logs for step 4 compile:
```
../Modules/zlibmodule.c:1802:21: error: implicit declaration of function ‘offsetof’ [-Werror=implicit-function-declaration]
#define COMP_OFF(x) offsetof(compobject, x)
^~~~~~~~
../Modules/zlibmodule.c:1804:39: note: in expansion of macro ‘COMP_OFF’
{"unused_data", _Py_T_OBJECT, COMP_OFF(unused_data), Py_READONLY},
^~~~~~~~
../Modules/zlibmodule.c:1802:21: note: ‘offsetof’ is defined in header ‘<stddef.h>’; did you forget to ‘#include <stddef.h>’?
../Modules/zlibmodule.c:1776:1:
+#include <stddef.h>
../Modules/zlibmodule.c:1802:21:
#define COMP_OFF(x) offsetof(compobject, x)
^~~~~~~~
../Modules/zlibmodule.c:1804:39: note: in expansion of macro ‘COMP_OFF’
{"unused_data", _Py_T_OBJECT, COMP_OFF(unused_data), Py_READONLY},
^~~~~~~~
../Modules/zlibmodule.c:1802:30: error: expected expression before ‘compobject’
#define COMP_OFF(x) offsetof(compobject, x)
^~~~~~~~~~
```
0 commit comments