After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750530 - ptp: FreeBSD, DragonFly and other BSDs don't have ifreq.ifw_hwaddr
ptp: FreeBSD, DragonFly and other BSDs don't have ifreq.ifw_hwaddr
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.5.1
Other FreeBSD
: Normal blocker
: 1.5.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-07 20:48 UTC by Koop Mast (kwm)
Modified: 2015-06-09 09:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Build fix (1.03 KB, patch)
2015-06-07 20:52 UTC, Koop Mast (kwm)
needs-work Details | Review

Description Koop Mast (kwm) 2015-06-07 20:48:36 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.
Comment 1 Koop Mast (kwm) 2015-06-07 20:52:09 UTC
Created attachment 304734 [details] [review]
Build fix
Comment 2 Sebastian Dröge (slomo) 2015-06-07 20:59:18 UTC
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?
Comment 3 Koop Mast (kwm) 2015-06-07 21:09:01 UTC
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.
Comment 4 Sebastian Dröge (slomo) 2015-06-07 21:31:56 UTC
I would check for SIOCGIFHWADDR and getifaddrs() :)
Comment 5 Sebastian Dröge (slomo) 2015-06-09 09:02:42 UTC
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