Bug 26509 - Cairo fails to compile without mmap
Summary: Cairo fails to compile without mmap
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.9.5
Hardware: All All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-10 03:31 UTC by Hib Eris
Modified: 2010-02-10 04:28 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
0001-Fix-compilation-without-HAVE_MMAP-outdef.patch (1.73 KB, patch)
2010-02-10 03:31 UTC, Hib Eris
Details | Splinter Review
0001-Fix-compilation-without-HAVE_MMAP-reshuffle.patch (2.08 KB, patch)
2010-02-10 03:35 UTC, Hib Eris
Details | Splinter Review

Description Hib Eris 2010-02-10 03:31:28 UTC
Created attachment 33210 [details] [review]
0001-Fix-compilation-without-HAVE_MMAP-outdef.patch

When I cross compile cairo with a mingw32 compiler, I have no HAVE_MMAP defined by configure. This causes a build failure, because not all mmap code is properly out defined in util/cairo-script/cairo-script-operators.c.

I've attached a patch to correct this.
Comment 1 Hib Eris 2010-02-10 03:35:55 UTC
Created attachment 33211 [details] [review]
0001-Fix-compilation-without-HAVE_MMAP-reshuffle.patch

This patch is an alternative to the previous one, reshuffling the code a bit to prevent having '#ifdef HAVE_MMAP' all over the code.

Because of the reshuffling, this patch is a not obviously correct, so please have a good look at it before accepting it. Or just take the previous patch.
Comment 2 Chris Wilson 2010-02-10 04:28:03 UTC
I think this is sufficient:

commit 5d34902c0cb9712179292112fbdb0f06be327fd8
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Feb 10 12:10:16 2010 +0000

    script: Compile without mmap
    
    Should fix:
      Bug 26509 - Cairo fails to compile without mmap
      http://bugs.freedesktop.org/show_bug.cgi?id=26509
    
    As reported by Hib Eris, Cairo files to compile under a mingw32
    cross-compiler as we use a structure only defined if HAVE_MMAP
    unconditionally.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.