]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/core-rtclock.c
remap: Change remapping function argument type from void to int16_t / float as approp...
[pulseaudio] / src / pulsecore / core-rtclock.c
index 331ac112ac71e1dc269d4c6340b1a4ceb6cb45f6..ee045549c6a1dcba38c6e8c48e9535b0f637ac86 100644 (file)
 #include <config.h>
 #endif
 
+#ifdef OS_IS_DARWIN
+#define _POSIX_C_SOURCE 1
+#endif
+
 #include <stddef.h>
 #include <time.h>
 #include <sys/time.h>
@@ -80,11 +84,11 @@ struct timeval *pa_rtclock_get(struct timeval *tv) {
 
 #ifdef CLOCK_MONOTONIC
     /* No locking or atomic ops for no_monotonic here */
-    static pa_bool_t no_monotonic = FALSE;
+    static bool no_monotonic = false;
 
     if (!no_monotonic)
         if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0)
-            no_monotonic = TRUE;
+            no_monotonic = true;
 
     if (no_monotonic)
 #endif /* CLOCK_MONOTONIC */
@@ -112,7 +116,7 @@ struct timeval *pa_rtclock_get(struct timeval *tv) {
     return pa_gettimeofday(tv);
 }
 
-pa_bool_t pa_rtclock_hrtimer(void) {
+bool pa_rtclock_hrtimer(void) {
 
 #if defined (OS_IS_DARWIN)
     mach_timebase_info_data_t tbi;
@@ -144,7 +148,7 @@ pa_bool_t pa_rtclock_hrtimer(void) {
 
 #endif /* HAVE_CLOCK_GETTIME */
 
-    return FALSE;
+    return false;
 }
 
 #define TIMER_SLACK_NS (int) ((500 * PA_NSEC_PER_USEC))
@@ -248,7 +252,7 @@ static struct timeval* wallclock_from_rtclock(struct timeval *tv) {
     return tv;
 }
 
-struct timeval* pa_timeval_rtstore(struct timeval *tv, pa_usec_t v, pa_bool_t rtclock) {
+struct timeval* pa_timeval_rtstore(struct timeval *tv, pa_usec_t v, bool rtclock) {
     pa_assert(tv);
 
     if (v == PA_USEC_INVALID)