Date: Mon, 4 Jun 2018 09:34:03 +0000 (UTC) From: Adriaan de Groot <adridg@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r471535 - in head/dns/kf5-kdnssd: . files Message-ID: <201806040934.w549Y3lg000505@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adridg Date: Mon Jun 4 09:34:03 2018 New Revision: 471535 URL: https://svnweb.freebsd.org/changeset/ports/471535 Log: dns/kf5-kdnssd: Fix build error when compiled with MDNSRESPONDER option KDE ports build with -DQT_NO_CAST_FROM_BYTEARRAY, so the implicit cast from QByteArray to const char * is not available. Make the necessary conversion explicit. This is being upstreamed as well (but would only land in 5.48 or later). PR: 228735 Submitted by: ashish Reported by: ashish Reviewed by: tcberner Added: head/dns/kf5-kdnssd/files/ head/dns/kf5-kdnssd/files/patch-src_mdnsd-publicservice.cpp (contents, props changed) head/dns/kf5-kdnssd/files/patch-src_mdnsd-remoteservice.cpp (contents, props changed) head/dns/kf5-kdnssd/files/patch-src_mdnsd-servicebrowser.cpp (contents, props changed) Modified: head/dns/kf5-kdnssd/Makefile Modified: head/dns/kf5-kdnssd/Makefile ============================================================================== --- head/dns/kf5-kdnssd/Makefile Mon Jun 4 08:46:46 2018 (r471534) +++ head/dns/kf5-kdnssd/Makefile Mon Jun 4 09:34:03 2018 (r471535) @@ -2,6 +2,7 @@ PORTNAME= kdnssd DISTVERSION= ${KDE_FRAMEWORKS_VERSION} +PORTREVISION= 1 CATEGORIES= dns kde kde-frameworks MAINTAINER= kde@FreeBSD.org Added: head/dns/kf5-kdnssd/files/patch-src_mdnsd-publicservice.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/dns/kf5-kdnssd/files/patch-src_mdnsd-publicservice.cpp Mon Jun 4 09:34:03 2018 (r471535) @@ -0,0 +1,20 @@ +--- src/mdnsd-publicservice.cpp.orig 2018-05-05 12:57:24 UTC ++++ src/mdnsd-publicservice.cpp +@@ -160,7 +160,7 @@ void PublicService::publishAsync() + TXTRecordCreate(&txt, 0, 0); + QMap<QString, QByteArray>::ConstIterator itEnd = d->m_textData.cend(); + for (QMap<QString, QByteArray>::ConstIterator it = d->m_textData.cbegin(); it != itEnd; ++it) { +- if (TXTRecordSetValue(&txt, it.key().toUtf8(), it.value().length(), it.value()) != kDNSServiceErr_NoError) { ++ if (TXTRecordSetValue(&txt, it.key().toUtf8().constData(), it.value().length(), it.value().data()) != kDNSServiceErr_NoError) { + TXTRecordDeallocate(&txt); + emit published(false); + return; +@@ -171,7 +171,7 @@ void PublicService::publishAsync() + Q_FOREACH (const QString &subtype, d->m_subtypes) { + fullType += ',' + subtype; + } +- if (DNSServiceRegister(&ref, 0, 0, d->m_serviceName.toUtf8(), fullType.toLatin1().constData(), domainToDNS(d->m_domain), NULL, ++ if (DNSServiceRegister(&ref, 0, 0, d->m_serviceName.toUtf8().constData(), fullType.toLatin1().constData(), domainToDNS(d->m_domain).constData(), NULL, + htons(d->m_port), TXTRecordGetLength(&txt), TXTRecordGetBytesPtr(&txt), publish_callback, + reinterpret_cast<void *>(d)) == kDNSServiceErr_NoError) { + d->setRef(ref); Added: head/dns/kf5-kdnssd/files/patch-src_mdnsd-remoteservice.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/dns/kf5-kdnssd/files/patch-src_mdnsd-remoteservice.cpp Mon Jun 4 09:34:03 2018 (r471535) @@ -0,0 +1,13 @@ +--- src/mdnsd-remoteservice.cpp.orig 2018-06-04 03:21:44 UTC ++++ src/mdnsd-remoteservice.cpp +@@ -82,8 +82,8 @@ void RemoteService::resolveAsync() + d->m_resolved = false; + //qDebug() << this << ":Starting resolve of : " << d->m_serviceName << " " << d->m_type << " " << d->m_domain << "\n"; + DNSServiceRef ref; +- if (DNSServiceResolve(&ref, 0, 0, d->m_serviceName.toUtf8(), d->m_type.toLatin1().constData(), +- domainToDNS(d->m_domain), (DNSServiceResolveReply)resolve_callback, reinterpret_cast<void *>(d)) ++ if (DNSServiceResolve(&ref, 0, 0, d->m_serviceName.toUtf8().constData(), d->m_type.toLatin1().constData(), ++ domainToDNS(d->m_domain).constData(), (DNSServiceResolveReply)resolve_callback, reinterpret_cast<void *>(d)) + == kDNSServiceErr_NoError) { + d->setRef(ref); + } Added: head/dns/kf5-kdnssd/files/patch-src_mdnsd-servicebrowser.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/dns/kf5-kdnssd/files/patch-src_mdnsd-servicebrowser.cpp Mon Jun 4 09:34:03 2018 (r471535) @@ -0,0 +1,11 @@ +--- src/mdnsd-servicebrowser.cpp.orig 2018-05-05 12:57:24 UTC ++++ src/mdnsd-servicebrowser.cpp +@@ -100,7 +100,7 @@ void ServiceBrowser::startBrowse() + fullType = d->m_subtype + "._sub." + d->m_type; + } + if (DNSServiceBrowse(&ref, 0, 0, fullType.toLatin1().constData(), +- domainToDNS(d->m_domain), query_callback, reinterpret_cast<void *>(d)) ++ domainToDNS(d->m_domain).constData(), query_callback, reinterpret_cast<void *>(d)) + == kDNSServiceErr_NoError) { + d->setRef(ref); + }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806040934.w549Y3lg000505>