From: Automerge script Date: Thu, 2 Mar 2006 23:03:50 +0000 (+0000) Subject: automerge commit X-Git-Tag: 1.2.5-netsec~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f9c385052e35dabecc7f9c9ff3caafab7c57457;p=thirdparty%2Fasterisk.git automerge commit git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@11633 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/Makefile b/Makefile index ece77719f5..3b2b7bd4f9 100644 --- a/Makefile +++ b/Makefile @@ -335,7 +335,9 @@ ASTCFLAGS+= $(MALLOC_DEBUG) ASTCFLAGS+= $(BUSYDETECT) ASTCFLAGS+= $(MIDCOM) ASTCFLAGS+= $(OPTIONS) +ifneq ($(findstring dont-optimize,$(MAKECMDGOALS)),dont-optimize) ASTCFLAGS+= -fomit-frame-pointer +endif SUBDIRS=res channels pbx apps codecs formats agi cdr funcs utils stdtime OBJS=io.o sched.o logger.o frame.o loader.o config.o channel.o \ diff --git a/asterisk.c b/asterisk.c index 42feb9f0fb..f29d7e182a 100644 --- a/asterisk.c +++ b/asterisk.c @@ -83,6 +83,9 @@ #if defined(__FreeBSD__) || defined( __NetBSD__ ) || defined(SOLARIS) #include +#if defined(SOLARIS) +extern int daemon(int, int); /* defined in libresolv of all places */ +#endif #endif #include "asterisk.h" @@ -2175,7 +2178,7 @@ int main(int argc, char *argv[]) exit(1); } if (setgid(gr->gr_gid)) { - ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", gr->gr_gid, rungroup); + ast_log(LOG_WARNING, "Unable to setgid to %d (%s)\n", (int)gr->gr_gid, rungroup); exit(1); } if (setgroups(0, NULL)) { @@ -2195,7 +2198,7 @@ int main(int argc, char *argv[]) } if (!rungroup) { if (setgid(pw->pw_gid)) { - ast_log(LOG_WARNING, "Unable to setgid to %d!\n", pw->pw_gid); + ast_log(LOG_WARNING, "Unable to setgid to %d!\n", (int)pw->pw_gid); exit(1); } if (initgroups(pw->pw_name, pw->pw_gid)) { @@ -2204,7 +2207,7 @@ int main(int argc, char *argv[]) } } if (setuid(pw->pw_uid)) { - ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", pw->pw_uid, runuser); + ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", (int)pw->pw_uid, runuser); exit(1); } setenv("ASTERISK_ALREADY_NONROOT","yes",1); @@ -2271,7 +2274,7 @@ int main(int argc, char *argv[]) unlink((char *)ast_config_AST_PID); f = fopen((char *)ast_config_AST_PID, "w"); if (f) { - fprintf(f, "%d\n", getpid()); + fprintf(f, "%d\n", (int)getpid()); fclose(f); } else ast_log(LOG_WARNING, "Unable to open pid file '%s': %s\n", (char *)ast_config_AST_PID, strerror(errno)); @@ -2282,7 +2285,7 @@ int main(int argc, char *argv[]) unlink((char *)ast_config_AST_PID); f = fopen((char *)ast_config_AST_PID, "w"); if (f) { - fprintf(f, "%d\n", getpid()); + fprintf(f, "%d\n", (int)getpid()); fclose(f); } else ast_log(LOG_WARNING, "Unable to open pid file '%s': %s\n", (char *)ast_config_AST_PID, strerror(errno));