summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-05-17 09:54:20 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-05-17 09:54:20 +0000
commitc8bd43a967355ddb5acb2fad757db3faaf7465fb (patch)
treebdf0448fcda73f30315d5591be793946c826ca16 /ext/socket
parent32599f5a9d24bf31d4c105be859ccf3f659bf227 (diff)
arity/strict yield
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/addrinfo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/socket/addrinfo.h b/ext/socket/addrinfo.h
index d4e2091d69..6ea4a823f6 100644
--- a/ext/socket/addrinfo.h
+++ b/ext/socket/addrinfo.h
@@ -154,4 +154,11 @@ extern void freehostent __P((struct hostent *));
extern void freeaddrent __P((struct addrinfo *));
extern char *gai_strerror __P((int));
+/* In case there is no definition of offsetof() provided - though any proper
+Standard C system should have one. */
+
+#ifndef offsetof
+#define offsetof(p_type,field) ((size_t)&(((p_type *)0)->field))
+#endif
+
#endif