]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: unconditionally include stddef.h
authorDavid Lamparter <equinox@opensourcerouting.org>
Tue, 30 Jul 2013 13:36:26 +0000 (15:36 +0200)
committerDavid Lamparter <equinox@diac24.net>
Tue, 30 Jul 2013 16:14:13 +0000 (18:14 +0200)
I've used offsetof() in the previous commit to paper over the security
problems in ospf_api.c.  This blows the build on FreeBSD 7.0, missing
offsetof().  Let's add that to zebra's generally used includes.

stddef.h (and offsetof) is defined in C89 section 4.1.5 (and not
deprecated/removed by any later standard).  If this causes problems, the
bug report should go against the host OS/compiler...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/zebra.h

index ffca7a8fbc035518fa43e4a0e3f2643b9eb03d15..780e12eb37bf9124c64da6fc6f8a38f29498294d 100644 (file)
@@ -40,6 +40,7 @@ typedef int socklen_t;
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stddef.h>
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>
@@ -175,7 +176,6 @@ typedef int socklen_t;
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
 #include <linux/filter.h>
-#include <stddef.h>
 #else
 #define RT_TABLE_MAIN          0
 #endif /* HAVE_NETLINK */