ptp: Don't use SIOCGIFHWADDR on Apple
authorSebastian Dröge <sebastian@centricular.com>
Wed, 3 Jun 2015 15:06:09 +0000 (17:06 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Wed, 3 Jun 2015 15:08:40 +0000 (17:08 +0200)
Just #ifdef the code for now, this should be implemented around
IOKit later instead of using ioctls.

libs/gst/helpers/gst-ptp-helper.c

index 2f10639..23d2d8d 100644 (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");