1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

Make patch sutrable for integration with vendor by putting back

#ifdef that we have had no business of removing in the first place.
Don't bump PORTREVISION since it makes no difference for the compiled
package.
This commit is contained in:
Maxim Sobolev 2008-10-20 17:26:22 +00:00
parent c36eea1935
commit 96b184e9dc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=221847
4 changed files with 28 additions and 44 deletions

View File

@ -1,20 +1,16 @@
--- main/utils.c.orig 2008-05-29 19:20:16.000000000 +0200
+++ main/utils.c 2008-10-03 21:36:14.000000000 +0200
@@ -914,8 +914,7 @@
$FreeBSD$
--- main/utils.c.orig
+++ main/utils.c
@@ -914,8 +914,8 @@
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.
@@ -924,7 +923,6 @@
the priority afterwards with pthread_setschedparam(). */
if ((errno = pthread_attr_setinheritsched(attr, PTHREAD_INHERIT_SCHED)))
ast_log(LOG_WARNING, "pthread_attr_setinheritsched: %s\n", strerror(errno));
-#endif
if (!stacksize)
stacksize = AST_STACKSIZE;

View File

@ -1,20 +1,16 @@
--- main/utils.c.orig 2008-05-29 19:20:16.000000000 +0200
+++ main/utils.c 2008-10-03 21:36:14.000000000 +0200
@@ -914,8 +914,7 @@
$FreeBSD$
--- main/utils.c.orig
+++ main/utils.c
@@ -914,8 +914,8 @@
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.
@@ -924,7 +923,6 @@
the priority afterwards with pthread_setschedparam(). */
if ((errno = pthread_attr_setinheritsched(attr, PTHREAD_INHERIT_SCHED)))
ast_log(LOG_WARNING, "pthread_attr_setinheritsched: %s\n", strerror(errno));
-#endif
if (!stacksize)
stacksize = AST_STACKSIZE;

View File

@ -1,20 +1,16 @@
--- main/utils.c.orig 2008-05-29 19:20:16.000000000 +0200
+++ main/utils.c 2008-10-03 21:36:14.000000000 +0200
@@ -914,8 +914,7 @@
$FreeBSD$
--- main/utils.c.orig
+++ main/utils.c
@@ -914,8 +914,8 @@
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.
@@ -924,7 +923,6 @@
the priority afterwards with pthread_setschedparam(). */
if ((errno = pthread_attr_setinheritsched(attr, PTHREAD_INHERIT_SCHED)))
ast_log(LOG_WARNING, "pthread_attr_setinheritsched: %s\n", strerror(errno));
-#endif
if (!stacksize)
stacksize = AST_STACKSIZE;

View File

@ -1,20 +1,16 @@
--- main/utils.c.orig 2008-05-29 19:20:16.000000000 +0200
+++ main/utils.c 2008-10-03 21:36:14.000000000 +0200
@@ -914,8 +914,7 @@
$FreeBSD$
--- main/utils.c.orig
+++ main/utils.c
@@ -914,8 +914,8 @@
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.
@@ -924,7 +923,6 @@
the priority afterwards with pthread_setschedparam(). */
if ((errno = pthread_attr_setinheritsched(attr, PTHREAD_INHERIT_SCHED)))
ast_log(LOG_WARNING, "pthread_attr_setinheritsched: %s\n", strerror(errno));
-#endif
if (!stacksize)
stacksize = AST_STACKSIZE;