summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2013-07-30 15:36:26 +0200
committerDavid Lamparter <equinox@diac24.net>2013-07-30 18:14:13 +0200
commitc423d413e464913ee88c1ee700e2c4037e6bdb24 (patch)
tree9cd9cf277703b89736a888a2bbb5455220789046 /lib
parentc51443f4aa6b7f0b0d6ad5409ad7d4b215092443 (diff)
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 <equinox@opensourcerouting.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/zebra.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/zebra.h b/lib/zebra.h
index ffca7a8f..780e12eb 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -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 */