mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Provide a definition for offsetof.
This commit is contained in:
parent
b9ab159052
commit
a45ecae474
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue