[Pixman] declaration of fence_malloc in util.[ch]

Siarhei Siamashka siarhei.siamashka at gmail.com
Tue Jan 25 05:53:13 PST 2011


On Sunday 23 January 2011 17:54:18 Maarten Bosmans wrote:
> Hi,
> 
> When cross-compiling pixman (0.21.4) with mingw, I get the following error:
>   CC     utils.o
> In file included from utils.c:3:0:
> utils.h:14:0: warning: ignoring #pragma omp threadprivate
> utils.c:298:1: error: conflicting types for 'fence_malloc'
> utils.h:69:1: note: previous declaration of 'fence_malloc' was here
> 
> Complete build log:
> https://build.opensuse.org/package/live_build_log?arch=i586&package=mingw32
> -pixman-unstable&project=home%3Amkbosmans%3Amingw32&repository=openSUSE_11.
> 3
> 
> In test/util.c fence_malloc is implemented roughly as:
> 
> #if defined(HAVE_MPROTECT) && defined(HAVE_GETPAGESIZE) &&
> defined(HAVE_SYS_MMAN_H)
> void * fence_malloc (int64_t len)
> {
>   /* implementation */
> }
> #else
> void * fence_malloc (int32_t len)
> {
>   return malloc (len);
> }
> #endif
> 
> While in test/util.h it is declared with an int64_t argument
> unconditionally.
> 
> What is the right resolution here? Either in the header file the
> definition of fence_malloc should also depend on the HAVE_ macros, or
> fence_malloc should always have an int64_t argument.

Yes, this problem also was reported at:
http://lists.freedesktop.org/archives/pixman/2011-January/000937.html

Should be fixed in pixman git master now.

-- 
Best regards,
Siarhei Siamashka


More information about the Pixman mailing list