From: Tilghman Lesher Date: Thu, 3 Jan 2008 01:59:27 +0000 (+0000) Subject: Compatibility fix for OpenBSD X-Git-Tag: 1.6.0-beta1~3^2~202 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77ecc4a46a7901410c0406c40ba602eaa4470496;p=thirdparty%2Fasterisk.git Compatibility fix for OpenBSD Report and fix by: mvanbaak (Closes issue #11669) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@96147 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_ices.c b/apps/app_ices.c index 88d118f089..b2a4e9b914 100644 --- a/apps/app_ices.c +++ b/apps/app_ices.c @@ -86,11 +86,11 @@ static int icesencode(char *filename, int fd) close(x); } /* Most commonly installed in /usr/local/bin */ - execl(ICES, "ices", filename, NULL); + execl(ICES, "ices", filename, (char *)NULL); /* But many places has it in /usr/bin */ - execl(LOCAL_ICES, "ices", filename, NULL); + execl(LOCAL_ICES, "ices", filename, (char *)NULL); /* As a last-ditch effort, try to use PATH */ - execlp("ices", "ices", filename, NULL); + execlp("ices", "ices", filename, (char *)NULL); ast_log(LOG_WARNING, "Execute of ices failed\n"); _exit(0); } diff --git a/apps/app_mp3.c b/apps/app_mp3.c index 9a4895214d..d2f2f5c0e2 100644 --- a/apps/app_mp3.c +++ b/apps/app_mp3.c @@ -82,19 +82,19 @@ static int mp3play(char *filename, int fd) /* Execute mpg123, but buffer if it's a net connection */ if (!strncasecmp(filename, "http://", 7)) { /* Most commonly installed in /usr/local/bin */ - execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, NULL); + execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL); /* But many places has it in /usr/bin */ - execl(MPG_123, "mpg123", "-q", "-s", "-b", "1024","-f", "8192", "--mono", "-r", "8000", filename, NULL); + execl(MPG_123, "mpg123", "-q", "-s", "-b", "1024","-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL); /* As a last-ditch effort, try to use PATH */ - execlp("mpg123", "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, NULL); + execlp("mpg123", "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL); } else { /* Most commonly installed in /usr/local/bin */ - execl(MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, NULL); + execl(MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL); /* But many places has it in /usr/bin */ - execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, NULL); + execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL); /* As a last-ditch effort, try to use PATH */ - execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, NULL); + execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL); } ast_log(LOG_WARNING, "Execute of mpg123 failed\n"); _exit(0); diff --git a/main/asterisk.c b/main/asterisk.c index 3e1ecad436..5d995c9a7e 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -2894,13 +2894,13 @@ int main(int argc, char *argv[]) for (fd = 0; fd < 100; fd++) close(fd); - execlp("astcanary", "astcanary", canary_filename, NULL); + execlp("astcanary", "astcanary", canary_filename, (char *)NULL); /* If not found, try the same path as used to execute asterisk */ ast_copy_string(canary_binary, argv[0], sizeof(canary_binary)); if ((lastslash = strrchr(canary_binary, '/'))) { ast_copy_string(lastslash + 1, "astcanary", sizeof(canary_binary) + canary_binary - (lastslash + 1)); - execl(canary_binary, "astcanary", canary_filename, NULL); + execl(canary_binary, "astcanary", canary_filename, (char *)NULL); } /* Should never happen */