jbagg / QtZeroConf

Qt wrapper class for ZeroConf libraries across various platforms.
Other
69 stars 51 forks source link

AvahiCode + Bonjour: use correct datatype for pos #51

Closed Dav1dK closed 2 years ago

Dav1dK commented 2 years ago

ssize_t is not available on windows (at least not with msvc2019). Use int as QByteArray::indexOf is defined with int return type.

jbagg commented 2 years ago

ssize_t is not available on windows

include

It is listed here

Dav1dK commented 2 years ago

This is SSIZE_T (uppercase). And I couldn't find a SSIZE_T on my linux system, so this is no alternative.

I still think, that using int would be the correct approach here, as this is the return type of QByteArray::indexOf. This will match in all cases.

If you still want to use ssize_t, we should include a typedef on Windows?

jbagg commented 2 years ago

Cherry picked to master. Closing.