OSDN Git Service

android: fix building errors on android-6.0.1_r52
[android-x86/external-bluetooth-bluez.git] / android / hal-audio.c
index 1caa4eb..f017c3b 100644 (file)
@@ -36,6 +36,7 @@
 #include "hal-msg.h"
 #include "hal-audio.h"
 #include "hal-utils.h"
+#include "hal.h"
 
 #define FIXED_A2DP_PLAYBACK_LATENCY_MS 25
 
@@ -86,7 +87,7 @@ static uint64_t timespec_diff_us(struct timespec *a, struct timespec *b)
        return res.tv_sec * 1000000ll + res.tv_nsec / 1000ll;
 }
 
-#if defined(ANDROID)
+#if ANDROID_VERSION < PLATFORM_VER(6, 0, 0)
 /*
  * Bionic does not have clock_nanosleep() prototype in time.h even though
  * it provides its implementation.