diff --git a/main/utils.c b/main/utils.c
index f9a5be26c7615e7b283c51b7531f3ff1e23b0702..ffef3ac976b2a9e7a207d92c96f64110ee8236a8 100644
--- a/main/utils.c
+++ b/main/utils.c
@@ -1256,8 +1256,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.