aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-17 00:14:29 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-03-17 00:14:29 +0000
commitabbeaec6b3be27ff95ff56f85674bc2d9f94fa59 (patch)
tree111161c056abd36215537b8c7962d6d0d2dfad72 /tests
parentc98856539ac7851b88b89bbaffad2ce634e20050 (diff)
Fix bamboo compile error by calculating an integer with the same size as a pointer.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@252980 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'tests')
-rw-r--r--tests/test_gosub.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/test_gosub.c b/tests/test_gosub.c
index 6efbe7851..5fb56dece 100644
--- a/tests/test_gosub.c
+++ b/tests/test_gosub.c
@@ -38,6 +38,16 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/test.h"
#include "asterisk/pbx.h"
+#if SIZEOF_INT == SIZEOF_CHAR_P
+#define compat_int int
+#elif SIZEOF_LONG == SIZEOF_CHAR_P
+#define compat_int long
+#elif SIZEOF_LONG_LONG == SIZEOF_CHAR_P
+#define compat_int long long
+#else
+#error "Cannot find an integer type the same size as a pointer"
+#endif
+
AST_TEST_DEFINE(test_gosub)
{
int res = AST_TEST_PASS, i;
@@ -125,7 +135,7 @@ AST_TEST_DEFINE(test_gosub)
}
} else {
/* Run application */
- int exec_res;
+ compat_int exec_res;
struct ast_app *app = pbx_findapp(testplan[i].app);
if (!app) {
ast_test_status_update(test, "Could not find '%s' in application listing!\n", testplan[i].app);