Jean-Louis,
The patch seems to have done the trick and Amanda has now compiled :)
P.S. Gcc version was 2.96
Thanks a lot
Rich.
> From: Jean-Louis Martineau <martineau AT zmanda DOT com>
> Date: Wed, 29 Mar 2006 06:54:17 -0500
> To: Richard Burridge <rburridge AT picdar DOT com>
> Cc: amanda-users <amanda-users AT amanda DOT org>
> Subject: Re: Problem compiling 2.5.0
>
> Richard,
>
> Which gcc are you using?
> Could you try the attached patch?
> We use a construct thjat is not valid for all compiler.
>
> Jean-Louis
>
> Richard Burridge wrote:
>> Hi,
>>
>> I'm trying to upgrade from 2.4.2 (which is running perfectly), but
>> having trouble compiling the new 2.5.0 release and got an error during
>> the make:
>>
>> --------
>> if gcc -DHAVE_CONFIG_H -I. -I. -I../config -I../common-src
>> -I../common-src -D_FILE_OFFSET_BITS=64 -D_FILE_OFFSET_BITS=64
>> -g -O2 -MT calcsize.o -MD -MP -MF ".deps/calcsize.Tpo" -c -o
>> calcsize.o calcsize.c; \
>> then mv -f ".deps/calcsize.Tpo" ".deps/calcsize.Po"; else rm -f
>> ".deps/calcsize.Tpo"; exit 1; fi
>> calcsize.c: In function `traverse_dirs':
>> calcsize.c:335: parse error before `char'
>> calcsize.c:342: `aparent' undeclared (first use in this function)
>> calcsize.c:342: (Each undeclared identifier is reported only once
>> calcsize.c:342: for each function it appears in.)
>> make[1]: *** [calcsize.o] Error 1
>> make[1]: Leaving directory `/home/amanda/amanda-2.5.0/client-src'
>> make: *** [all-recursive] Error 1
>> ---------
>>
>> Platform is RedHat 2.1AS, kernel 2.4.9-e.65. Anyone got any ideas?
>>
>>
>> Cheers,
>> Rich.
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
> --- amanda-2.5.0b2.orig1/client-src/calcsize.c 2006-03-09 11:51:41.000000000
> -0500
> +++ amanda-2.5.0b2.new/client-src/calcsize.c 2006-03-29 06:49:41.000000000
> -0500
> @@ -329,10 +329,11 @@ char *include;
> int l;
> int parent_len;
> int has_exclude = !is_empty_sl(exclude_sl) && use_gtar_excl;
> + char *aparent;
>
> if(parent_dir == NULL || include == NULL) return;
>
> - char *aparent = vstralloc(parent_dir, "/", include, NULL);
> + aparent = vstralloc(parent_dir, "/", include, NULL);
>
> if(stat(parent_dir, &finfo) != -1)
> parent_dev = finfo.st_dev;
|