Closed seidnerj closed 2 years ago
Yes, I know, I just thought leaving the code unchanged and merely updating the Makefile is more elegant.
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. :)
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: @.***>
IPPROTO_IP
is what BSD uses, andSOL_IP
andIPPROTO_IP
are both 0 on Linux, so you can just change thesetsockopt
call instead of detecting the OS.