diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-10-27 11:45:49 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-10-27 11:45:49 +0000 |
commit | 46aa3347cb72a78253d66cee79e17413af61804c (patch) | |
tree | 5a6a7cebc3f9800c1819d1438e9a53e273da5747 /sys/netinet6/icmp6.c | |
parent | 303fd73aa775b9289ced7cc21fa3ad62d283450e (diff) | |
download | src-46aa3347cb72a78253d66cee79e17413af61804c.tar.gz src-46aa3347cb72a78253d66cee79e17413af61804c.zip |
Convert all users of fldoff() to offsetof(). fldoff() is bad
because it only takes a struct tag which makes it impossible to
use unions, typedefs etc.
Define __offsetof() in <machine/ansi.h>
Define offsetof() in terms of __offsetof() in <stddef.h> and <sys/types.h>
Remove myriad of local offsetof() definitions.
Remove includes of <stddef.h> in kernel code.
NB: Kernelcode should *never* include from /usr/include !
Make <sys/queue.h> include <machine/ansi.h> to avoid polluting the API.
Deprecate <struct.h> with a warning. The warning turns into an error on
01-12-2000 and the file gets removed entirely on 01-01-2001.
Paritials reviews by: various.
Significant brucifications by: bde
Notes
Notes:
svn path=/head/; revision=67708
Diffstat (limited to 'sys/netinet6/icmp6.c')
-rw-r--r-- | sys/netinet6/icmp6.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index a5f6326d05be..9dca71e71902 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -1061,9 +1061,7 @@ icmp6_mtudisc_update(dst, icmp6, m) * with hostname changes by sethostname(3) */ #define hostnamelen strlen(hostname) -#ifndef offsetof /* XXX */ -#define offsetof(type, member) ((size_t)(&((type *)0)->member)) -#endif + static struct mbuf * ni6_input(m, off) struct mbuf *m; |