Module Name:    src
Committed By:   kre
Date:           Sun Oct 27 01:28:38 UTC 2024

Modified Files:
        src/external/apache2/mDNSResponder/dist/mDNSShared: dnssd_clientlib.c
            dnssd_clientstub.c
        src/external/apache2/mDNSResponder/lib: Makefile

Log Message:
Fix the builds after mDNSD updates

There are 3 changes here:

1. Fixes an obvious merge botch in
                dist/mDNSShared/dnssd_clientlib.c
        This one should be perfectly safe.

2. Removes (via #if 0) some code which looks to now be done a different way.
        There is a reasonable probability this one might be correct.
        If not, there is definitely more work to be done.
        This is in (two places in)
                dist/mDNSShared/dnssd_clientstub.c

3. Adjust CPPFLAGS so things compile
        -I${DIST}/mDNSCore
                this is needed for "mdns_strict.h"
        This change should be safe.

        -DmDNSResponderVersion
                Since it is used in several places, and as best
                I can tell, never defined.
        For this one I have no idea what its value should be, so
        I guessed...   That should be safe enough as it appears it
        is only used for log messages, and internal @(#) type identity
        strings.   But someone who knows what version it is supposed
        to call itself might want to fix this.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
    src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c
cvs rdiff -u -r1.12 -r1.13 \
    src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c
cvs rdiff -u -r1.2 -r1.3 src/external/apache2/mDNSResponder/lib/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c:1.7 src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c:1.8
--- src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c:1.7	Sat Oct 26 18:14:19 2024
+++ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientlib.c	Sun Oct 27 01:28:38 2024
@@ -366,14 +366,12 @@ DNSServiceErrorType DNSSD_API TXTRecordG
 #define DNSSD_USED
 #endif
 
-// NOT static -- otherwise the compiler may optimize it out
-// The "@(#) " pattern is a special prefix the "what" command looks for
-    STRINGIFY(mDNSResponderVersion)
-
 #if defined(__GNUC__)
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdate-time"
 #endif
+// NOT static -- otherwise the compiler may optimize it out
+// The "@(#) " pattern is a special prefix the "what" command looks for
 const char VersionString_SCCS_libdnssd[] DNSSD_USED = "@(#) libdns_sd " STRINGIFY(mDNSResponderVersion)
 #ifndef MDNS_VERSIONSTR_NODTS
     " (" __DATE__ " " __TIME__ ")" 

Index: src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.12 src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.13
--- src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c:1.12	Sat Oct 26 18:14:19 2024
+++ src/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c	Sun Oct 27 01:28:38 2024
@@ -2064,10 +2064,12 @@ DNSServiceErrorType DNSServiceRegisterIn
     *ptr++ = port.b[1];
     put_uint16(txtLen, &ptr);
     put_rdata(txtLen, txtRecord, &ptr);
+#if 0
     if (attr)
     {
         put_attribute_tlvs(attr, hdr, &ptr, limit);
     }
+#endif
 
     err = deliver_request(hdr, *sdRef);     // Will free hdr for us
     if (err == kDNSServiceErr_NoAuth && !_should_return_noauth_error())
@@ -2397,10 +2399,12 @@ DNSServiceErrorType DNSServiceRegisterRe
     put_uint16(rdlen, &ptr);
     put_rdata(rdlen, rdata, &ptr);
     put_uint32(ttl, &ptr);
+#if 0
     if (attr)
     {
         put_attribute_tlvs(attr, hdr, &ptr, limit);
     }
+#endif
     if (flags & kDNSServiceFlagsQueueRequest)
     {
         hdr->ipc_flags |= IPC_FLAGS_NOERRSD;

Index: src/external/apache2/mDNSResponder/lib/Makefile
diff -u src/external/apache2/mDNSResponder/lib/Makefile:1.2 src/external/apache2/mDNSResponder/lib/Makefile:1.3
--- src/external/apache2/mDNSResponder/lib/Makefile:1.2	Thu Oct  1 09:35:08 2009
+++ src/external/apache2/mDNSResponder/lib/Makefile	Sun Oct 27 01:28:38 2024
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.2 2009/10/01 09:35:08 tron Exp $
+#	$NetBSD: Makefile,v 1.3 2024/10/27 01:28:38 kre Exp $
 
 .include <bsd.init.mk>
 
 LIB=	dns_sd
 
 SRCS=	dnssd_clientlib.c dnssd_clientstub.c dnssd_ipc.c  
-CPPFLAGS+=-I${DIST}/mDNSShared
+CPPFLAGS+=-I${DIST}/mDNSShared -I${DIST}/mDNSCore -DmDNSResponderVersion=2559
 
 COPTS.dnssd_clientstub.c += -Wno-stack-protector
 

Reply via email to