From: David Lamparter Date: Tue, 30 Jul 2013 13:36:26 +0000 (+0200) Subject: lib: unconditionally include stddef.h X-Git-Tag: frr-2.0-rc1~1660 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c423d413e464913ee88c1ee700e2c4037e6bdb24;p=mirror%2Ffrr.git lib: unconditionally include stddef.h 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 --- diff --git a/lib/zebra.h b/lib/zebra.h index ffca7a8fbc..780e12eb37 100644 --- a/lib/zebra.h +++ b/lib/zebra.h @@ -40,6 +40,7 @@ typedef int socklen_t; #include #include #include +#include #include #include #include @@ -175,7 +176,6 @@ typedef int socklen_t; #include #include #include -#include #else #define RT_TABLE_MAIN 0 #endif /* HAVE_NETLINK */