fix build on non-x86

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2018-06-24 18:05:44 +02:00
parent 9a636ae039
commit e8b25f46b8
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C
2 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1,41 @@
From ac5743244bd889c7596f53f0513cf645a682dcaa Mon Sep 17 00:00:00 2001
From: Igor Gnatenko <ignatenko@src.gnome.org>
Date: Sun, 24 Jun 2018 18:03:34 +0200
Subject: [PATCH] fix casting in filter_related()
Fixes: https://gitlab.gnome.org/GNOME/librsvg/issues/302
Signed-off-by: Igor Gnatenko <ignatenko@src.gnome.org>
---
rsvg_internals/src/drawing_ctx.rs | 2 +-
rsvg_internals/src/filters/ffi.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index f7d8c60e..f3f4f02f 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -333,7 +333,7 @@ impl<'a> DrawingCtx {
node,
&output,
self,
- "2103".as_ptr() as *const i8,
+ "2103".as_ptr() as *const libc::c_char,
))
} else {
None
diff --git a/rsvg_internals/src/filters/ffi.rs b/rsvg_internals/src/filters/ffi.rs
index 8a4e04d7..3a333cbd 100644
--- a/rsvg_internals/src/filters/ffi.rs
+++ b/rsvg_internals/src/filters/ffi.rs
@@ -91,7 +91,7 @@ pub fn filter_render(
let mut channelmap_arr = [0; 4];
unsafe {
for i in 0..4 {
- channelmap_arr[i] = i32::from(*channelmap.offset(i as isize) - '0' as i8);
+ channelmap_arr[i] = i32::from(*channelmap.offset(i as isize) - '0' as c_char);
}
}
--
2.18.0.rc2

View File

@ -14,6 +14,8 @@ URL: https://wiki.gnome.org/Projects/LibRsvg
Source: http://download.gnome.org/sources/librsvg/2.43/librsvg-%{version}.tar.xz
# https://gitlab.gnome.org/GNOME/librsvg/commit/60f8afdfe6c5b667c015b2124cd46fd1d5bb07ee
Patch0001: 0001-deps-bump-regex-to-1.patch
# https://gitlab.gnome.org/GNOME/librsvg/merge_requests/87
Patch0002: 0001-fix-casting-in-filter_related.patch
BuildRequires: gcc
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.20