aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_rpt.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-25 04:50:00 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-25 04:50:00 +0000
commitd96e5fd0c14c16317b52c246126240dd38f70760 (patch)
tree12209bd676defd0966efde966f4582866c93a932 /apps/app_rpt.c
parent101af7f914a4c2a8ded573514343f01c6bca9037 (diff)
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/branches/1.4@159025 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_rpt.c')
-rw-r--r--apps/app_rpt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index 305161df4..b7dc13fdc 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -273,7 +273,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 <netinet/in.h>
@@ -3362,6 +3364,7 @@ struct dahdi_params par;
{
res = set_ic706(myrpt);
}
+#ifdef HAVE_IOPERM
else if(!strcmp(myrpt->remote, remote_rig_rbi))
{
if (ioperm(myrpt->p.iobase,1,1) == -1)
@@ -3372,6 +3375,7 @@ struct dahdi_params par;
}
else res = setrbi(myrpt);
}
+#endif
else if(!strcmp(myrpt->remote, remote_rig_kenwood))
{
res = setkenwood(myrpt);
@@ -10987,6 +10991,7 @@ static int rpt_exec(struct ast_channel *chan, void *data)
}
rpt_mutex_lock(&myrpt->lock);
}
+#ifdef HAVE_IOPERM
if ((!strcmp(myrpt->remote, remote_rig_rbi)) &&
(ioperm(myrpt->p.iobase,1,1) == -1))
{
@@ -10994,6 +10999,7 @@ static int rpt_exec(struct ast_channel *chan, void *data)
ast_log(LOG_WARNING, "Cant 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);