Magellan Linux

Annotation of /trunk/colord/patches/colord-0.1.17-build.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1695 - (hide annotations) (download)
Sat Mar 10 22:23:13 2012 UTC (12 years, 2 months ago) by niro
File size: 1072 byte(s)
-added a build fix
1 niro 1695 From 638a98fef16fa15946522d4112660b4b20c0d630 Mon Sep 17 00:00:00 2001
2     From: Richard Hughes <richard@hughsie.com>
3     Date: Thu, 23 Feb 2012 10:43:37 +0000
4     Subject: [PATCH] trivial: Fix compile with older versions of GLib
5    
6     g_mapped_file_new_from_fd() was introduced in 2.31.0 not 2.30.0 as the
7     docs suggested.
8    
9     Resoves https://bugs.freedesktop.org/show_bug.cgi?id=46481
10     ---
11     src/cd-profile.c | 10 ++++++++++
12     1 files changed, 10 insertions(+), 0 deletions(-)
13    
14     diff --git a/src/cd-profile.c b/src/cd-profile.c
15     index a292616..323588b 100644
16     --- a/src/cd-profile.c
17     +++ b/src/cd-profile.c
18     @@ -1066,7 +1066,17 @@ cd_profile_set_fd (CdProfile *profile,
19     }
20    
21     /* create a mapped file */
22     +#if GLIB_CHECK_VERSION(2,31,0)
23     priv->mapped_file = g_mapped_file_new_from_fd (fd, FALSE, error);
24     + if (priv->mapped_file == NULL) {
25     + g_set_error (error,
26     + CD_MAIN_ERROR,
27     + CD_MAIN_ERROR_FAILED,
28     + "failed to create mapped file from fd %i",
29     + fd);
30     + goto out;
31     + }
32     +#endif
33    
34     /* parse the ICC file */
35     lcms_profile = cmsOpenProfileFromStream (stream, "r");
36     --
37     1.7.6