From 58e8f6ee1c97d8ae89163abcfb2aec658c2b990a Mon Sep 17 00:00:00 2001 From: "David Kahles (KDV)" Date: Thu, 7 Apr 2022 13:48:38 +0200 Subject: [PATCH] AvahiCode + Bonjour: use correct datatype for pos ssize_t is not available on windows (at least not with msvc2019). Use int as QByteArray::indexOf is defined with int return type. --- avahicore.cpp | 2 +- bonjour.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/avahicore.cpp b/avahicore.cpp index 5d2345d..b9dd1ca 100644 --- a/avahicore.cpp +++ b/avahicore.cpp @@ -183,7 +183,7 @@ public: while (txt) // get txt records { QByteArray avahiText((const char *)txt->text, txt->size); - const ssize_t pos = avahiText.indexOf('='); + const int pos = avahiText.indexOf('='); if (pos < 0) zcs->m_txt[avahiText] = ""; else diff --git a/bonjour.cpp b/bonjour.cpp index 63103f1..f4b6bc0 100644 --- a/bonjour.cpp +++ b/bonjour.cpp @@ -167,7 +167,7 @@ void DNSSD_API QZeroConfPrivate::resolverCallback(DNSServiceRef, DNSServiceFlags recLen = txtRecord[0]; txtRecord++; QByteArray avahiText(reinterpret_cast(txtRecord), recLen); - const ssize_t pos = avahiText.indexOf('='); + const int pos = avahiText.indexOf('='); if (pos < 0) resolver->zcs->m_txt[avahiText] = ""; else