From: xndr <27174230+xndr@users.noreply.github.com> Date: Wed, 15 Oct 2025 18:41:57 +0000 (-0700) Subject: Add missing compat.h header under src/client/ X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b3e92135f8b44ddb56377e20430ae3a57c819237;p=thirdparty%2Flldpd.git Add missing compat.h header under src/client/ Under certain conditions, build would fail due to a missing reference to \#include "../compat/compat.h" in text_writer.c, kv_writer.c and xml_writer.c. example: --------------- lldpd-1.0.20/src/client/text_writer.c:157:9: fatal error: call to undeclared function 'rpl_malloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] priv = malloc(sizeof(*priv)); ^ ../../config.h:316:16: note: expanded from macro 'malloc' \#define malloc rpl_malloc ^ 1 error generated. make[2]: *** [lldpcli-text_writer.o] Error 1 make[1]: *** [install-recursive] Error 1 make: *** [stamp-x86_64] Error 2 --------------- lldpd-1.0.20/src/client/kv_writer.c:41:19: fatal error: call to undeclared function 'rpl_malloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] if ((newprefix = malloc(s + 1)) == NULL) fatal(NULL, NULL); ^ ../../config.h:316:16: note: expanded from macro 'malloc' \#define malloc rpl_malloc ^ 1 error generated. make[2]: *** [lldpcli-kv_writer.o] Error 1 make[1]: *** [install-recursive] Error 1 make: *** [stamp-x86_64] Error 2 --------------- lldpd-1.0.20/src/client/xml_writer.c:139:9: fatal error: call to undeclared function 'rpl_malloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] priv = malloc(sizeof(*priv)); ^ ../../config.h:316:16: note: expanded from macro 'malloc' \#define malloc rpl_malloc ^ 1 error generated. make[2]: *** [lldpcli-xml_writer.o] Error 1 make[1]: *** [install-recursive] Error 1 make: *** [stamp-x86_64] Error 2 --- diff --git a/src/client/kv_writer.c b/src/client/kv_writer.c index 56c9a431..ed2fb27f 100644 --- a/src/client/kv_writer.c +++ b/src/client/kv_writer.c @@ -21,6 +21,7 @@ #include #include "writer.h" +#include "../compat/compat.h" #include "../log.h" #define SEP '.' diff --git a/src/client/text_writer.c b/src/client/text_writer.c index 95990e74..ddab693c 100644 --- a/src/client/text_writer.c +++ b/src/client/text_writer.c @@ -21,6 +21,7 @@ #include #include "writer.h" +#include "../compat/compat.h" #include "../log.h" static char sep[] = diff --git a/src/client/xml_writer.c b/src/client/xml_writer.c index 0c5efb55..befe7e01 100644 --- a/src/client/xml_writer.c +++ b/src/client/xml_writer.c @@ -30,6 +30,7 @@ #endif #include "writer.h" +#include "../compat/compat.h" #include "../log.h" struct xml_writer_private {