summaryrefslogtreecommitdiff
path: root/lib/strlcpy.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2018-08-28 10:57:13 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-09-08 21:30:42 +0200
commitb45ac5f5c61f98b0aacf65b456547142193ae1fc (patch)
treecc932f64c64d19ce520e6947f80ab181c3a741b5 /lib/strlcpy.c
parentdbac691da646e624addc8f3ed5e744f9d3f8d69f (diff)
*: fix config.h/zebra.h include order
config.h (or, transitively, zebra.h) must be the first include file listed for autoconf things like _GNU_SOURCE and _POSIX_C_SOURCE to work correctly. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/strlcpy.c')
-rw-r--r--lib/strlcpy.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/strlcpy.c b/lib/strlcpy.c
index b0c33ca7f4..71ee9f1a54 100644
--- a/lib/strlcpy.c
+++ b/lib/strlcpy.c
@@ -20,9 +20,11 @@
/* adapted for Quagga from glibc patch submission originally from
* Florian Weimer <fweimer@redhat.com>, 2016-05-18 */
-#include <string.h>
-
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
+
+#include <string.h>
#ifndef HAVE_STRLCPY
#undef strlcpy