mirror of https://github.com/python/cpython
Provide a definition for offsetof.
This commit is contained in:
parent
b9ab159052
commit
a45ecae474
|
@ -178,6 +178,14 @@ Socket methods:
|
||||||
#include <netpacket/packet.h>
|
#include <netpacket/packet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_STDDEF_H
|
||||||
|
#include <stddef.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef offsetof
|
||||||
|
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef O_NDELAY
|
#ifndef O_NDELAY
|
||||||
#define O_NDELAY O_NONBLOCK /* For QNX only? */
|
#define O_NDELAY O_NONBLOCK /* For QNX only? */
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue