mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Fix bamboo compile error by calculating an integer with the same size as a pointer.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252980 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user