Provide a definition for offsetof.

This commit is contained in:
Martin v. Löwis 2001-06-24 21:28:42 +00:00
parent b9ab159052
commit a45ecae474
1 changed files with 8 additions and 0 deletions

View File

@ -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