diff mbox series

[meta-networking,1/3] mdns: Add PACKAGECONFIGs for idlesleepcontrol, spc and unicast

Message ID 20260602153548.97549-3-alex.kiernan@gmail.com
State New
Headers show
Series [meta-networking,1/3] mdns: Add PACKAGECONFIGs for idlesleepcontrol, spc and unicast | expand

Commit Message

Alex Kiernan June 2, 2026, 3:35 p.m. UTC
These three knobs are exposed to reduce the code size for embedded (see
mDNSCore/mDNSEmbeddedAPI.h). If you need them, you'll know you need
them, everyone else almost certainly doesn't.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
 .../recipes-protocols/mdns/mdns_2881.100.56.0.1.bb   | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-networking/recipes-protocols/mdns/mdns_2881.100.56.0.1.bb b/meta-networking/recipes-protocols/mdns/mdns_2881.100.56.0.1.bb
index 48e7a8d52d3e..3950ee666fc4 100644
--- a/meta-networking/recipes-protocols/mdns/mdns_2881.100.56.0.1.bb
+++ b/meta-networking/recipes-protocols/mdns/mdns_2881.100.56.0.1.bb
@@ -27,7 +27,10 @@  PACKAGECONFIG ?= "tls \
 PACKAGECONFIG[debug] = "DEBUG=1,DEBUG=0"
 PACKAGECONFIG[ipv6] = "HAVE_IPV6=1,HAVE_IPV6=0"
 PACKAGECONFIG[manpages] = ""
+PACKAGECONFIG[idlesleepcontrol] = ""
+PACKAGECONFIG[spc] = ""
 PACKAGECONFIG[tls] = ",tls=no,mbedtls"
+PACKAGECONFIG[unicast] = ""
 
 CVE_PRODUCT = "apple:mdnsresponder"
 
@@ -48,8 +51,15 @@  EXTRA_OEMAKE = "os=linux 'CC=${CCLD}' 'LD=${CCLD}' 'LINKOPTS=${LDFLAGS}' STRIP=:
 
 # MDNS_VERSIONSTR_NODTS disables __DATE__ and __TIME__ in the version string,
 # which are fixed anyway for build reproducibility.
+#
+# IDLESLEEPCONTROL_DISABLED - disables sleep control for Bonjour Sleep Proxy clients
+# UNICAST_DISABLED - disables unicast DNS functionality, including Wide Area Bonjour
+# SPC_DISABLED - disables Bonjour Sleep Proxy client
 TARGET_CPPFLAGS += "-DmDNSResponderVersion=${PV} \
-                    -DMDNS_VERSIONSTR_NODTS"
+                    -DMDNS_VERSIONSTR_NODTS \
+                    ${@bb.utils.contains('PACKAGECONFIG','idlesleepcontrol','','-DIDLESLEEPCONTROL_DISABLED', d)} \
+                    ${@bb.utils.contains('PACKAGECONFIG','unicast','','-DUNICAST_DISABLED', d)} \
+                    ${@bb.utils.contains('PACKAGECONFIG','spc','','-DSPC_DISABLED', d)}"
 
 TARGET_CC_ARCH += "${LDFLAGS}"