[Mono-dev] Tweaks needed to get Mono compiling in the Android build environment

Koushik K. Dutta koush at koushikdutta.com
Sun Jan 18 05:50:28 EST 2009


Hi Christian, the failure is occurring at the code seen below in GetDiskSpaceFreeEx:

#ifdef HAVE_STATVFS
		ret = statvfs (utf8_path_name, &fsstat);
		isreadonly = ((fsstat.f_flag & ST_RDONLY) == ST_RDONLY);
#elif defined(HAVE_STATFS)
		ret = statfs (utf8_path_name, &fsstat);
		isreadonly = ((fsstat.f_flags & MNT_RDONLY) == MNT_RDONLY);
#endif 

Bionic does not have the statvfs function, and its statfs struct does not have the f_flags member. It also does not have the the MNT_RDONLY macro/define. Although I can add the macro, nothing can be done about the missing/different structures. So that hole in Bionic is not really patchable unfortunately. However, the fallback implementation of GetDiskSpaceFreeEx works fine... so it's not too huge a deal. My change is forcing it to use the fallback.

Koushik Dutta
www.koushikdutta.com

-----Original Message-----
From: Christian Prochnow [mailto:cproch at seculogix.de] 
Sent: Sunday, January 18, 2009 2:11 AM
To: Koushik K. Dutta
Cc: mono-devel-list at lists.ximian.com
Subject: Re: [Mono-dev] Tweaks needed to get Mono compiling in the Android build environment

Hi,

Koushik K. Dutta schrieb:
> 2.       io.c: Although Android has statfs, there are some missing
> functions and defines that prevent GetDiskSpaceFreeEx from compiling. I
> used the PLATFORM_ANDROID define again to make it fall back to the
> simpler implementation.

could you give me the exact compilation error, maybe i can tweak the
GetDiskFreeSpaceEx implementation to also compile on the Android platform.


Best regards,


Christian



-- 
Christian Prochnow
Geschäftsführer

SecuLogiX Systems GmbH
Mohriner Allee 28
12347 Berlin

http://www.seculogix.de

mobile:  +49 (0)177 313 02 57
   fon:  +49 (0)700 SECULOGIX

Geschäftsführer: Christian Prochnow
Handelsregister: B 96491, Amtsgericht Charlottenburg


More information about the Mono-devel-list mailing list