summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/socketmodule.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c
index 507e6aa..c4c758c 100644
--- a/Modules/socketmodule.c
+++ b/Modules/socketmodule.c
@@ -178,6 +178,14 @@ Socket methods:
#include <netpacket/packet.h>
#endif
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
+#ifndef offsetof
+#define offsetof(type, member) ((size_t)(&((type *)0)->member))
+#endif
+
#ifndef O_NDELAY
#define O_NDELAY O_NONBLOCK /* For QNX only? */
#endif