GNOME Bugzilla – Bug 750530
ptp: FreeBSD, DragonFly and other BSDs don't have ifreq.ifw_hwaddr
Last modified: 2015-06-09 09:03:13 UTC
The build fails because FreeBSD doesn't have the ifw_hwaddr component in the ifreq struct. Add #if defined()'s to make it build the alternative code voor Apple which works for use too. While here do the same for DragonFly.
Created attachment 304734 [details] [review] Build fix
Thanks! I was planning to do a similar patch, but instead check in configure if we have SIOCGIFHWADDR or can use getifaddrs() or in the worst case have to use a random value (and do a #warning). That seems more future proof :) Do you want to update your patch?
Thats possible. Another way is to check struct ifreq for ifr_hwaddr. I'm willing to do the work of updating the patch to make this happen, the only question is which method to pick.
I would check for SIOCGIFHWADDR and getifaddrs() :)
I've done this now, needed to (try to) fix the build on Debian/kFreeBSD :) Please check if this also helps in your case. commit 1ae38f7ba738c2adaaebc66576143f96cdd5e962 Author: Sebastian Dröge <sebastian@centricular.com> Date: Tue Jun 9 10:59:42 2015 +0200 ptp: Check for the actual API we use instead of just looking for __APPLE__ Should fix the build on FreeBSD, DragonFly and other BSDs. https://bugzilla.gnome.org/show_bug.cgi?id=750530