geekman / mdns-repeater

mDNS repeater
GNU General Public License v2.0
190 stars 58 forks source link

Fix Makefile to allow for compilation on recent versions of Mac OS X #14

Closed seidnerj closed 2 years ago

kennylevinsen commented 2 years ago

IPPROTO_IP is what BSD uses, and SOL_IP and IPPROTO_IP are both 0 on Linux, so you can just change the setsockopt call instead of detecting the OS.

seidnerj commented 2 years ago

Yes, I know, I just thought leaving the code unchanged and merely updating the Makefile is more elegant.

kennylevinsen commented 2 years ago

In my eyes, one line that works on all target platforms is definitely more elegant than 14 lines of platform detection that introduces Linux-specific defines on BSD-like platforms. :)

seidnerj commented 2 years ago

Hehe, I guess you’re right but I couldn’t make this call on my own as I couldn’t confirm it works on all target platforms - if that is indeed the case, then by all means, let’s change it and be done with it :)

On Sat, 7 May 2022 at 22:59 Kenny Levinsen @.***> wrote:

In my eyes, one line that works on all target platforms is definitely more elegant than 14 lines of platform detection that introduces Linux-specific defines on BSD-like platforms. :)

— Reply to this email directly, view it on GitHub https://github.com/kennylevinsen/mdns-repeater/pull/14#issuecomment-1120278035, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7URNOIQWYLVT526HIYG7LVI3DRFANCNFSM5VDNJ6XQ . You are receiving this because you authored the thread.Message ID: @.***>