]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Clean us a few compilation errors.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 8 Aug 2022 08:58:16 +0000 (09:58 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 8 Aug 2022 08:58:16 +0000 (09:58 +0100)
common.c

index f8b7ae1a968e327abab39b49a7a5de543eda79bd..c4f9ac81be262516fbc8d3b26b3e58d1877f6684 100644 (file)
--- a/common.c
+++ b/common.c
@@ -62,6 +62,9 @@
 #endif
 
 #ifdef COMPILE_FOR_OSX
+#include <net/if_dl.h>
+#include <net/if_types.h>
+#include <netinet/in.h>
 #include <CoreServices/CoreServices.h>
 #include <mach/mach.h>
 #include <mach/mach_time.h>
@@ -1220,7 +1223,6 @@ uint64_t get_monotonic_time_in_ns() {
 
 #ifdef COMPILE_FOR_OSX
   uint64_t time_now_mach;
-  uint64_t elapsedNano;
   static mach_timebase_info_data_t sTimebaseInfo = {0, 0};
 
   // this actually give you a monotonic clock
@@ -1238,7 +1240,7 @@ uint64_t get_monotonic_time_in_ns() {
   }
 
   if (sTimebaseInfo.denom == 0)
-    die("could not initialise Mac timebase info in get_monotonic_time_in_ns().")
+    die("could not initialise Mac timebase info in get_monotonic_time_in_ns().");
 
         // Do the maths. We hope that the multiplication doesn't
         // overflow; the price you pay for working in fixed point.
@@ -1283,7 +1285,6 @@ uint64_t get_absolute_time_in_ns() {
 
 #ifdef COMPILE_FOR_OSX
   uint64_t time_now_mach;
-  uint64_t elapsedNano;
   static mach_timebase_info_data_t sTimebaseInfo = {0, 0};
 
   // this actually give you a monotonic clock
@@ -1303,7 +1304,7 @@ uint64_t get_absolute_time_in_ns() {
   // overflow; the price you pay for working in fixed point.
 
   if (sTimebaseInfo.denom == 0)
-    die("could not initialise Mac timebase info in get_absolute_time_in_ns().")
+    die("could not initialise Mac timebase info in get_absolute_time_in_ns().");
 
         // this gives us nanoseconds
         time_now_ns = time_now_mach * sTimebaseInfo.numer / sTimebaseInfo.denom;
@@ -1953,7 +1954,6 @@ int get_device_id(uint8_t *id, int int_length) {
     response = -1;
   } else {
     t = id;
-    int found = 0;
     for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
 #ifdef AF_PACKET
       if ((ifa->ifa_addr) && (ifa->ifa_addr->sa_family == AF_PACKET)) {
@@ -1962,7 +1962,6 @@ int get_device_id(uint8_t *id, int int_length) {
           for (i = 0; ((i < s->sll_halen) && (i < int_length)); i++) {
             *t++ = s->sll_addr[i];
           }
-          found = 1;
         }
       }
 #else
@@ -1975,7 +1974,6 @@ int get_device_id(uint8_t *id, int int_length) {
             debug(1, "char %d: \"%c\".", i, *s);
             *t++ = (uint8_t)*s++;
           }
-          found = 1;
         }
       }
 #endif