X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=perl%2FAmanda%2FApplication.c;h=c2d6a1dc06df04555f9655ea3ac4336a5305426a;hb=011a59f5a54864108a16af570a6b287410597cc2;hp=91f2daf57d53aa1933f42f938a733591362d0725;hpb=96f35b20267e8b1a1c846d476f27fcd330e0b018;p=debian%2Famanda diff --git a/perl/Amanda/Application.c b/perl/Amanda/Application.c index 91f2daf..c2d6a1d 100644 --- a/perl/Amanda/Application.c +++ b/perl/Amanda/Application.c @@ -8,6 +8,9 @@ * interface file instead. * ----------------------------------------------------------------------------- */ +#include "../config/config.h" + + #define SWIGPERL #define SWIG_CASTRANK_MODE @@ -1679,7 +1682,9 @@ XS(_wrap_run_calcsize_C) { num = av_len(tempav); for (i=0; i <= num; i++) { tv = av_fetch(tempav, i, 0); - level = g_slist_append(level, GINT_TO_POINTER(SvIV(*tv))); + /* (gint) cast is required because sizeof(IV) may not be sizeof(gint). + * Both will be >= 32 bits, though, and that's sufficient for a level. */ + level = g_slist_append(level, GINT_TO_POINTER((gint)SvIV(*tv))); } arg5 = level; }