fix build issues on ppc

This commit is contained in:
Matthias Clasen 2007-07-13 01:54:21 +00:00
parent f0241dfe36
commit 600fbb07fe
2 changed files with 45 additions and 1 deletions

View File

@ -3,13 +3,15 @@
Summary: A library of handy utility functions
Name: glib2
Version: 2.13.7
Release: 1%{?dist}
Release: 2%{?dist}
License: LGPL
Group: System Environment/Libraries
URL: http://www.gtk.org
Source: http://download.gnome.org/sources/glib/2.13/glib-%{version}.tar.bz2
Source2: glib2.sh
Source3: glib2.csh
# fixed in upstream svn
Patch0: ppc-cast.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pkgconfig >= 1:0.14
BuildRequires: gettext
@ -45,6 +47,7 @@ of version 2 of the GLib library.
%prep
%setup -q -n glib-%{version}
%patch0 -p1 -b .ppc-cast
%build
for i in config.guess config.sub ; do
@ -117,6 +120,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/lib*.a
%changelog
* Thu Jul 12 2007 Matthias Clasen <mclasen@redhat.com> - 2.13.7-2
- Fix build issues on ppc
* Thu Jul 12 2007 Matthias Clasen <mclasen@redhat.com> - 2.13.7-1
- Update to 2.13.7

38
ppc-cast.patch Normal file
View File

@ -0,0 +1,38 @@
diff -up glib-2.13.7/glib/gthread.c.ppc-cast glib-2.13.7/glib/gthread.c
--- glib-2.13.7/glib/gthread.c.ppc-cast 2007-07-12 21:43:31.000000000 -0400
+++ glib-2.13.7/glib/gthread.c 2007-07-12 21:43:45.000000000 -0400
@@ -223,11 +223,11 @@ void
g_once_init_leave (volatile gsize *value_location,
gsize initialization_value)
{
- g_return_if_fail (g_atomic_pointer_get (value_location) == 0);
+ g_return_if_fail (g_atomic_pointer_get ((void*) value_location) == 0);
g_return_if_fail (initialization_value != 0);
g_return_if_fail (g_once_init_list != NULL);
- g_atomic_pointer_set (value_location, initialization_value);
+ g_atomic_pointer_set ((void*) value_location, (void*) initialization_value);
g_mutex_lock (g_once_mutex);
g_once_init_list = g_slist_remove (g_once_init_list, (void*) value_location);
g_cond_broadcast (g_once_cond);
@@ -255,7 +255,7 @@ g_static_mutex_get_mutex_impl (GMutex**
g_mutex_lock (g_once_mutex);
if (!(*mutex))
- g_atomic_pointer_set (mutex, g_mutex_new());
+ g_atomic_pointer_set ((void*) mutex, g_mutex_new());
g_mutex_unlock (g_once_mutex);
diff -up glib-2.13.7/glib/gthread.h.ppc-cast glib-2.13.7/glib/gthread.h
--- glib-2.13.7/glib/gthread.h.ppc-cast 2007-07-12 21:43:27.000000000 -0400
+++ glib-2.13.7/glib/gthread.h 2007-07-12 21:43:43.000000000 -0400
@@ -332,7 +332,7 @@ void g_once_init_leav
G_INLINE_FUNC gboolean
g_once_init_enter (volatile gsize *value_location)
{
- if G_LIKELY (g_atomic_pointer_get (value_location) !=0)
+ if G_LIKELY (g_atomic_pointer_get ((void*) value_location) !=0)
return FALSE;
else
return g_once_init_enter_impl (value_location);