summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Include/structmember.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/structmember.h b/Include/structmember.h
index 6bd9e72..7a047b9 100644
--- a/Include/structmember.h
+++ b/Include/structmember.h
@@ -30,6 +30,10 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Interface to map C struct members to Python object attributes */
+#ifdef HAVE_STDDEF_H
+#include <stddef.h> /* For offsetof */
+#endif
+
/* The offsetof() macro calculates the offset of a structure member
in its structure. Unfortunately this cannot be written down
portably, hence it is provided by a Standard C header file.