aboutsummaryrefslogtreecommitdiffstats
path: root/asterisk.c
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-14 19:04:48 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-02-14 19:04:48 +0000
commit6583688474069059d629a1670deef5e5fff0a68d (patch)
treec2cff7af7ee620faebfebfa5537e6353cec72b1e /asterisk.c
parenta3d46f310471f1d2c40061fca60debbed1c601eb (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@9987 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'asterisk.c')
-rw-r--r--asterisk.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/asterisk.c b/asterisk.c
index 0ec8f9979..4a0e77885 100644
--- a/asterisk.c
+++ b/asterisk.c
@@ -75,9 +75,12 @@
#include <grp.h>
#include <pwd.h>
#include <sys/stat.h>
-#include <sys/prctl.h>
#include <regex.h>
+#ifdef linux
+#include <sys/prctl.h>
+#endif
+
#if defined(__FreeBSD__) || defined( __NetBSD__ ) || defined(SOLARIS)
#include <netdb.h>
#endif
@@ -2210,12 +2213,16 @@ int main(int argc, char *argv[])
#endif /* __CYGWIN__ */
+#ifdef linux
+
if (geteuid() && option_dumpcore) {
if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
ast_log(LOG_WARNING, "Unable to set the process for core dumps after changing to a non-root user. %s\n", strerror(errno));
}
}
+#endif
+
term_init();
printf(term_end());
fflush(stdout);