Commit 3af74817 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵
Browse files

ptp: Don't use SIOCGIFHWADDR on Apple

Just #ifdef the code for now, this should be implemented around
IOKit later instead of using ioctls.
parent 55f79dd1
...@@ -270,9 +270,14 @@ setup_sockets (void) ...@@ -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) ...@@ -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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment