Summary: | ASTERISK-13475: muted doesn't compile on OS/X in dev-mode | ||
Reporter: | Olle Johansson (oej) | Labels: | |
Date Opened: | 2009-01-29 04:30:26.000-0600 | Date Closed: | 2009-02-06 09:44:24.000-0600 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Utilities/muted |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) config.log | |
Description: | cc1: warnings being treated as errors muted.c: In function 'main': muted.c:687: warning: 'daemon' is deprecated (declared at /usr/include/stdlib.h:283) make[1]: *** [muted.o] Error 1 make: *** [utils] Error 2 | ||
Comments: | By: Tilghman Lesher (tilghman) 2009-01-29 13:27:00.000-0600 Please upload your config.log. By: Olle Johansson (oej) 2009-01-29 13:35:49.000-0600 Here it is :-) By: Tilghman Lesher (tilghman) 2009-01-29 14:09:09.000-0600 Okay, here's the thing. Your config.log has detected /sbin/launchd, which should set a define in include/asterisk/autoconfig.h, with "#define HAVE_SBIN_LAUNCHD 1", and that detected in muted.c ensures that daemon(3) is not called. So somewhere, your compilation is breaking down, but the code is there to prevent it. By: Olle Johansson (oej) 2009-01-29 14:12:37.000-0600 Well, it's breaking down in trunk too. What do you recommend? Make clean, run configure, try again? By: Tilghman Lesher (tilghman) 2009-01-29 14:25:29.000-0600 Sure. For the record, I'm not getting this on 10.4 on a PPC machine. By: Olle Johansson (oej) 2009-01-29 14:40:16.000-0600 make clean, configure --enable-dev-mode ...the same result. hepatica:asterisk-1.6.1 olle$ grep SBIN_LAUNCH * config.log:#define HAVE_SBIN_LAUNCHD 1 config.status:s,^\([ #]*\)[^ ]*\([ ]*HAVE_SBIN_LAUNCHD\)[ (].*,\1define\2 1 , configure:#define HAVE_SBIN_LAUNCHD 1 configure.ac: AC_CHECK_FILE(/sbin/launchd, AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.])) By: Tilghman Lesher (tilghman) 2009-01-29 14:43:16.000-0600 tilghman@dot40:~/Asterisk/asterisk-trunk$ grep HAVE_SBIN_LAUNCHD include/asterisk/* include/asterisk/autoconfig.h:#define HAVE_SBIN_LAUNCHD 1 include/asterisk/autoconfig.h.in:#undef HAVE_SBIN_LAUNCHD include/asterisk/autoconfig.h.in.orig:#undef HAVE_SBIN_LAUNCHD include/asterisk/autoconfig.h.in~:#undef HAVE_SBIN_LAUNCHD tilghman@dot40:~/Asterisk/asterisk-trunk$ By: Olle Johansson (oej) 2009-01-29 14:46:18.000-0600 Index: utils/muted.c =================================================================== --- utils/muted.c (revision 172234) +++ utils/muted.c (arbetskopia) @@ -52,6 +52,8 @@ #include <netinet/in.h> #include <arpa/inet.h> +#include "asterisk/autoconfig.h" + static char *config = "/etc/muted.conf"; static char host[256] = ""; Fixed it. By: Olle Johansson (oej) 2009-01-29 14:46:50.000-0600 But it doesn't look right - can't find any direct include of autoconfig in any .c file By: Digium Subversion (svnbot) 2009-01-29 14:54:10.000-0600 Repository: asterisk Revision: 172402 _U branches/1.6.1/ U branches/1.6.1/utils/muted.c ------------------------------------------------------------------------ r172402 | tilghman | 2009-01-29 14:54:10 -0600 (Thu, 29 Jan 2009) | 11 lines Merged revisions 146514 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk (closes issue ASTERISK-13475) Reported by: oej ........ r146514 | russell | 2008-10-05 17:11:30 -0500 (Sun, 05 Oct 2008) | 2 lines Make this build on my mac. ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=172402 By: Olle Johansson (oej) 2009-02-06 04:06:52.000-0600 Realized that this applies to 1.4 as well. By: Digium Subversion (svnbot) 2009-02-06 09:43:32.000-0600 Repository: asterisk Revision: 173900 U branches/1.4/utils/muted.c ------------------------------------------------------------------------ r173900 | tilghman | 2009-02-06 09:43:32 -0600 (Fri, 06 Feb 2009) | 3 lines Backport OS X fix from trunk (AGAIN, closes issue ASTERISK-13475) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=173900 By: Digium Subversion (svnbot) 2009-02-06 09:44:23.000-0600 Repository: asterisk Revision: 173901 _U trunk/ ------------------------------------------------------------------------ r173901 | tilghman | 2009-02-06 09:44:23 -0600 (Fri, 06 Feb 2009) | 9 lines Blocked revisions 173900 via svnmerge ........ r173900 | tilghman | 2009-02-06 09:43:32 -0600 (Fri, 06 Feb 2009) | 3 lines Backport OS X fix from trunk (AGAIN, closes issue ASTERISK-13475) ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=173901 |