summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2015-09-08 16:11:00 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-09-08 16:11:00 -0500
commitfdf77633ed7c49b868f6812284d35c8580a0d808 (patch)
tree95ebd0f0c30cf3f11c529511b49a9642c0dc666a
parent820b9dc13810929d7280178c9cf0c5f08709d59b (diff)
parentfbdb42c9fc305c43989cb3a9e3fbdf764b78d83f (diff)
Merge "Core/General: Add #ifdef needed on FreeBSD."
-rw-r--r--main/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/utils.c b/main/utils.c
index 4bcfa3349..ba1a07ca2 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -1251,8 +1251,8 @@ int ast_pthread_create_stack(pthread_t *thread, pthread_attr_t *attr, void *(*st
pthread_attr_init(attr);
}
-#ifdef __linux__
- /* On Linux, pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED,
+#if defined(__linux__) || defined(__FreeBSD__)
+ /* On Linux and FreeBSD , pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED,
which is kind of useless. Change this here to
PTHREAD_INHERIT_SCHED; that way the -p option to set realtime
priority will propagate down to new threads by default.