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 */
if (clock_id == (guint64) - 1) {
struct ifreq ifr;
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) {
gchar **ptr = ifaces;
@ -329,6 +334,7 @@ setup_sockets (void)
}
}
}
#endif
if (!success) {
g_warning ("can't get any MAC address, using random clock id");