diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-25 05:02:11 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-25 05:02:11 +0000 |
commit | 5d1e952b32e039c327b3ebf4ca76c9c23f2964d1 (patch) | |
tree | 859949e236c0023fb7475dfffc2e2fd54e3c6292 /apps/app_rpt.c | |
parent | 279d77a2827bea35143f1774e67f092bd7e98511 (diff) |
Merged revisions 159025 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r159025 | tilghman | 2008-11-24 22:50:00 -0600 (Mon, 24 Nov 2008) | 3 lines
System call ioperm is non-portable, so check for its existence in autoconf.
(Closes issue #13863)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159050 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_rpt.c')
-rw-r--r-- | apps/app_rpt.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c index b3a26dd7b..cc02c4807 100644 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -331,7 +331,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <sys/time.h> #include <sys/file.h> #include <sys/ioctl.h> +#ifdef HAVE_SYS_IO_H #include <sys/io.h> +#endif #include <sys/vfs.h> #include <math.h> #include <dahdi/user.h> @@ -4483,6 +4485,7 @@ struct dahdi_params par; { res = set_ic706(myrpt); } +#ifdef HAVE_IOPERM else if(!strcmp(myrpt->remoterig, remote_rig_rbi)||!strcmp(myrpt->remoterig, remote_rig_ppp16)) { if (ioperm(myrpt->p.iobase,1,1) == -1) @@ -4493,6 +4496,7 @@ struct dahdi_params par; } else res = setrbi(myrpt); } +#endif else if(!strcmp(myrpt->remoterig, remote_rig_kenwood)) { if (myrpt->iofd >= 0) setdtr(myrpt->iofd,1); @@ -10756,7 +10760,8 @@ char tmpstr[300],lstr[MAXLINKLIST]; rpt_mutex_unlock(&myrpt->lock); usleep(100000); rpt_mutex_lock(&myrpt->lock); - } + } +#ifdef HAVE_IOPERM if ((!strcmp(myrpt->remoterig, remote_rig_rbi)) && (ioperm(myrpt->p.iobase,1,1) == -1)) { @@ -10765,6 +10770,7 @@ char tmpstr[300],lstr[MAXLINKLIST]; myrpt->rpt_thread = AST_PTHREADT_STOP; pthread_exit(NULL); } +#endif strncpy(tmpstr,myrpt->rxchanname,sizeof(tmpstr) - 1); tele = strchr(tmpstr,'/'); if (!tele) @@ -13721,6 +13727,7 @@ static int rpt_exec(struct ast_channel *chan, void *data) } } +#ifdef HAVE_IOPERM if ( (!strcmp(myrpt->remoterig, remote_rig_rbi)||!strcmp(myrpt->remoterig, remote_rig_ppp16)) && (ioperm(myrpt->p.iobase,1,1) == -1)) { @@ -13728,6 +13735,7 @@ static int rpt_exec(struct ast_channel *chan, void *data) ast_log(LOG_WARNING, "Can't get io permission on IO port %x hex\n",myrpt->p.iobase); return -1; } +#endif myrpt->remoteon = 1; #ifdef OLD_ASTERISK LOCAL_USER_ADD(u); |