summaryrefslogtreecommitdiff
path: root/system/gsmartcontrol/04_glib2.31.patch
diff options
context:
space:
mode:
authorponce <matteo.bernardini@gmail.com>2012-07-24 21:05:04 +0200
committerRobby Workman <rworkman@slackbuilds.org>2012-08-21 08:55:31 -0500
commitd8cc375543fea8adfe304e9a569491b740edc4c9 (patch)
tree43dbb1e7d58798a0d8c0e903d724454056f1f9c5 /system/gsmartcontrol/04_glib2.31.patch
parent7283ec7d0bd7336f56260ba5e0d7d408d37b5f67 (diff)
downloadslackbuilds-d8cc375543fea8adfe304e9a569491b740edc4c9.tar.gz
system/gsmartcontrol: Updated for version 0.8.6.
Also adds a fix for gcc-4.7.x and a patch for glib >= 2.31. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/gsmartcontrol/04_glib2.31.patch')
-rw-r--r--system/gsmartcontrol/04_glib2.31.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/system/gsmartcontrol/04_glib2.31.patch b/system/gsmartcontrol/04_glib2.31.patch
new file mode 100644
index 0000000000..9f5073c192
--- /dev/null
+++ b/system/gsmartcontrol/04_glib2.31.patch
@@ -0,0 +1,42 @@
+Description: Fixed compilation under Glib 2.31.x.
+Origin: Upstream, http://svn.berlios.de/viewvc/gsmartcontrol/trunk/gsmartcontrol/src/hz/sync_policy_glib.h?r1=27&r2=72&view=patch
+Author: Alexander Shaduri
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/935155
+Bug-Debian: http://bugs.debian.org/665677
+
+--- gsmartcontrol/src/hz/sync_policy_glib.h 2011/03/06 10:43:38 27
++++ gsmartcontrol/src/hz/sync_policy_glib.h 2011/11/02 16:00:39 72
+@@ -17,30 +17,14 @@
+ // Glib-based policy.
+
+
+-// Note: g_static_mutex_*lock() functions may give warnings about breaking strict-aliasing rules.
+-// The warnings are completely harmless and visible on some versions of glib only.
+-// However, due to their number, I decided to implement this workaround.
+-
+-#ifndef _WIN32
+- // same as stock version, but an additional cast to (void*) is added.
+- #define hz_glib_static_mutex_get_mutex(mutex) \
+- ( g_thread_use_default_impl ? ((GMutex*) ((void*)((mutex)->static_mutex.pad))) : \
+- g_static_mutex_get_mutex_impl_shortcut(&((mutex)->runtime_mutex)) )
+-
+-#else
+- // win32 has different definition of this macro, so default to stock version.
+- #define hz_glib_static_mutex_get_mutex(mutex) g_static_mutex_get_mutex(mutex)
+-#endif
+-
+-
+ #define hz_glib_static_mutex_lock(mutex) \
+- g_mutex_lock(hz_glib_static_mutex_get_mutex(mutex))
++ g_mutex_lock(g_static_mutex_get_mutex(mutex))
+
+ #define hz_glib_static_mutex_trylock(mutex) \
+- g_mutex_trylock(hz_glib_static_mutex_get_mutex(mutex))
++ g_mutex_trylock(g_static_mutex_get_mutex(mutex))
+
+ #define hz_glib_static_mutex_unlock(mutex) \
+- g_mutex_unlock(hz_glib_static_mutex_get_mutex(mutex))
++ g_mutex_unlock(g_static_mutex_get_mutex(mutex))
+
+
+