diff --git a/src/queue.c b/src/queue.c index 86018fde9..a08f21b5b 100644 --- a/src/queue.c +++ b/src/queue.c @@ -5148,6 +5148,7 @@ _dispatch_trystash_to_deferred_items(dispatch_queue_t dq, dispatch_object_t dou, } #endif +#if HAVE_PTHREAD_WORKQUEUE_QOS DISPATCH_NOINLINE static void _dispatch_queue_push_slow(dispatch_queue_t dq, dispatch_object_t dou, @@ -5157,6 +5158,7 @@ _dispatch_queue_push_slow(dispatch_queue_t dq, dispatch_object_t dou, _dispatch_root_queues_init_once); _dispatch_queue_push(dq, dou, pp); } +#endif DISPATCH_NOINLINE void diff --git a/src/shims/android_stubs.h b/src/shims/android_stubs.h index 934552d51..576f89065 100644 --- a/src/shims/android_stubs.h +++ b/src/shims/android_stubs.h @@ -27,8 +27,10 @@ (var) = (tvar)) #endif /* TAILQ_FOREACH_SAFE */ +#if DISPATCH_DEBUG #ifndef TRASHIT # define TRASHIT(x) do {(x) = (void *)-1;} while (0) #endif /* TRASHIT */ +#endif -#endif /* __DISPATCH__ANDROID__STUBS__INTERNAL */ \ No newline at end of file +#endif /* __DISPATCH__ANDROID__STUBS__INTERNAL */ diff --git a/src/shims/getprogname.h b/src/shims/getprogname.h index 0aafaef4e..7eb19787e 100644 --- a/src/shims/getprogname.h +++ b/src/shims/getprogname.h @@ -26,7 +26,7 @@ #ifdef __ANDROID__ extern const char *__progname; -#endif /* __ANDROID */) +#endif /* __ANDROID */ static inline char * getprogname(void) diff --git a/src/shims/linux_stubs.h b/src/shims/linux_stubs.h index 8bdf3ff0e..bafe40921 100644 --- a/src/shims/linux_stubs.h +++ b/src/shims/linux_stubs.h @@ -16,6 +16,18 @@ #ifndef __DISPATCH__STUBS__INTERNAL #define __DISPATCH__STUBS__INTERNAL +#ifndef TAILQ_FOREACH_SAFE +#define TAILQ_FOREACH_SAFE(var, head, field, temp) \ + for ((var) = TAILQ_FIRST((head)); \ + (var) && ((temp) = TAILQ_NEXT((var), field), 1); (var) = (temp)) +#endif + +#if DISPATCH_DEBUG +#ifndef TRASHIT +#define TRASHIT(x) do { (x) = (void *)-1; } while (0) +#endif +#endif + /* * Stub out defines for some mach types and related macros */