nuttx-apps/netutils/mdns/verbose_option.patch
Tim Hardisty 30b1c024a1 apps/netutils: add mdns library support
This commit allows an external mDNS library to be included in NuttX.

It originates from here: <https://github.com/mjansson/mdns>

It is declared as being in the Public Domain as per <http://unlicense.org>

Signed-off-by: Tim Hardisty <timh@jti.uk.com>
2025-06-02 23:18:24 +08:00

17 lines
395 B
Diff

--- mdns/mdns.c
+++ mdns/mdns/mdns.c
@@ -22,7 +22,9 @@
// Alias some things to simulate recieving data to fuzz library
#if defined(MDNS_FUZZING)
#define recvfrom(sock, buffer, capacity, flags, src_addr, addrlen) ((mdns_ssize_t)capacity)
-#define printf
+#endif
+#if defined(MDNS_FUZZING) || !defined(CONFIG_NETUTILS_MDNS_VERBOSE)
+#define printf(...)
#endif
#include "mdns.h"
--
2.34.1