ptp: Don't use SIOCGIFHWADDR on Apple

Just #ifdef the code for now, this should be implemented around
IOKit later instead of using ioctls.
This commit is contained in:
Sebastian Dröge 2015-06-03 17:06:09 +02:00
parent 55f79dd195
commit 3af74817c1

View file

@ -270,9 +270,14 @@ setup_sockets (void)
/* Get a clock id from the MAC address if none was given */ /* Get a clock id from the MAC address if none was given */
if (clock_id == (guint64) - 1) { if (clock_id == (guint64) - 1) {
struct ifreq ifr;
gboolean success = FALSE; gboolean success = FALSE;
/* FIXME: On Apple platforms use IOKit APIs to iterate
* network interfaces and get MAC addresses. Think different!
*/
#ifndef __APPLE__
struct ifreq ifr;
if (ifaces) { if (ifaces) {
gchar **ptr = ifaces; gchar **ptr = ifaces;
@ -329,6 +334,7 @@ setup_sockets (void)
} }
} }
} }
#endif
if (!success) { if (!success) {
g_warning ("can't get any MAC address, using random clock id"); g_warning ("can't get any MAC address, using random clock id");