librespot-org / libmdns

mDNS Responder library for building discoverable LAN services in Rust
https://crates.io/crates/libmdns
MIT License
71 stars 34 forks source link

Illumos does not support set_reuse_port, reuse_address is sufficient #32

Closed urknall closed 3 years ago

urknall commented 3 years ago

Would be great to get this as new version on crates.io Thank you!

willstott101 commented 3 years ago

Would this be better as #[cfg(all(not(target_os = "windows"), not(target_os = "illumos")))] actually now I've written that out it's horrible. I'll try and get a release out later today. Thanks

urknall commented 3 years ago

indeed i had it first the way you wrote, but i found it to confusing. do as you please ;)

thank you!

urknall commented 3 years ago

maybe this way its cleaner and easier to expand when the list of os not supporting this feature is growing:

    #[cfg(any(
        (not(target_os = "illumos"),
        (not(target_os = "windows")
    ))]
urknall commented 3 years ago
    #[cfg(any(
        not(target_os = "illumos"),
        not(target_os = "windows")
    ))]

now we have it finally ;)

willstott101 commented 3 years ago

I'm pretty sure it should be cfg(all(, not cfg(any( but that's clearly meaning it's more confusing than it needs to be. So I've merged your original commit and release as 0.6.2 - thanks!