]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
compat: include config.h in compat.h
authorVincent Bernat <bernat@luffy.cx>
Sun, 23 Jun 2013 12:26:53 +0000 (14:26 +0200)
committerVincent Bernat <bernat@luffy.cx>
Sun, 23 Jun 2013 12:26:53 +0000 (14:26 +0200)
Without this inclusion, no `HAVE_*` macro was defined. This was
triggered because with some libc, `strndup()` is defined by a macro
and therefore cannot be redefined as a function.

src/compat/compat.h

index 643a78281bb708fd8260041d8aa2fafb566c1113..cf623fcaa451b99a60bffbc838421db1ef0a932c 100644 (file)
 #ifndef _COMPAT_H
 #define _COMPAT_H
 
+#if HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stddef.h>
 #ifdef HAVE_LIBBSD