summaryrefslogtreecommitdiffstats
path: root/main/asterisk/100-uclibc-daemon.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/asterisk/100-uclibc-daemon.patch')
-rw-r--r--main/asterisk/100-uclibc-daemon.patch10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/asterisk/100-uclibc-daemon.patch b/main/asterisk/100-uclibc-daemon.patch
index a1e2b0b20..f3c605350 100644
--- a/main/asterisk/100-uclibc-daemon.patch
+++ b/main/asterisk/100-uclibc-daemon.patch
@@ -1,13 +1,14 @@
-diff -Nru asterisk-1.6.1-beta4.org/main/asterisk.c asterisk-1.6.1-beta4/main/asterisk.c
---- asterisk-1.6.1-beta4.org/main/asterisk.c 2008-12-12 23:05:58.000000000 +0100
-+++ asterisk-1.6.1-beta4/main/asterisk.c 2008-12-23 15:28:21.000000000 +0100
-@@ -3295,9 +3295,40 @@
+--- asterisk-11.2.1-orig/main/asterisk.c
++++ asterisk-11.2.1/main/asterisk.c
+@@ -3891,11 +3891,41 @@
#if HAVE_WORKING_FORK
if (ast_opt_always_fork || !ast_opt_no_fork) {
#ifndef HAVE_SBIN_LAUNCHD
+#ifndef __UCLIBC__
if (daemon(1, 0) < 0) {
fprintf(stderr, "daemon() failed: %s\n", strerror(errno));
+- } else {
+- ast_mainpid = getpid();
}
+#else
+ /*
@@ -39,6 +40,7 @@ diff -Nru asterisk-1.6.1-beta4.org/main/asterisk.c asterisk-1.6.1-beta4/main/ast
+ close(fd);
+ }
+#endif
++ ast_mainpid = getpid();
#else
fprintf(stderr, "Mac OS X detected. Use 'launchctl load /Library/LaunchDaemon/org.asterisk.asterisk.plist'.\n");
#endif