Clean us a few compilation errors.

This commit is contained in:
Mike Brady
2022-08-08 09:58:16 +01:00
parent 1f82109577
commit bc7d122a9e
+5 -7
View File
@@ -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