fix build
This commit is contained in:
Wim Taymans 2017-02-20 12:21:15 +01:00
parent 231f569fa1
commit eec26b9ad7
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,66 @@
From a15f7ad8f86d6331272024530b940577de6c74e3 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Mon, 20 Feb 2017 12:16:32 +0100
Subject: [PATCH] info: put () around macro arguments
Put braces around macro arguments or else we might run into problems
with operater precedence.
---
gst/gstinfo.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/gst/gstinfo.h b/gst/gstinfo.h
index f8be4d2..31992b7 100644
--- a/gst/gstinfo.h
+++ b/gst/gstinfo.h
@@ -434,16 +434,16 @@ void gst_printerrln (const gchar * format, ...) G_GNUC_PRINT
* see https://bugzilla.gnome.org/show_bug.cgi?id=764526 */
#define gst_debug_add_log_function(func,data,notify) \
G_STMT_START{ \
- if (func == (void *) gst_debug_log_default) { \
+ if ((func) == (void *) gst_debug_log_default) { \
gst_debug_add_log_function(NULL,data,notify); \
} else { \
gst_debug_add_log_function(func,data,notify); \
} \
}G_STMT_END
-#define gst_debug_remove_log_function(func) \
- (func == (void *) gst_debug_log_default) ? \
- gst_debug_remove_log_function(NULL) : \
+#define gst_debug_remove_log_function(func) \
+ ((func) == (void *) gst_debug_log_default) ? \
+ gst_debug_remove_log_function(NULL) : \
gst_debug_remove_log_function(func)
/**
@@ -563,7 +563,7 @@ GST_EXPORT GstDebugLevel _gst_debug_min;
*/
#ifdef G_HAVE_ISO_VARARGS
#define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{ \
- if (G_UNLIKELY (level <= GST_LEVEL_MAX && level <= _gst_debug_min)) { \
+ if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) { \
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
(GObject *) (object), __VA_ARGS__); \
} \
@@ -571,7 +571,7 @@ GST_EXPORT GstDebugLevel _gst_debug_min;
#else /* G_HAVE_GNUC_VARARGS */
#ifdef G_HAVE_GNUC_VARARGS
#define GST_CAT_LEVEL_LOG(cat,level,object,args...) G_STMT_START{ \
- if (G_UNLIKELY (level <= GST_LEVEL_MAX && level <= _gst_debug_min)) { \
+ if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) { \
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
(GObject *) (object), ##args ); \
} \
@@ -581,7 +581,7 @@ static inline void
GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
GstDebugLevel level, gpointer object, const char *format, va_list varargs)
{
- if (G_UNLIKELY (level <= GST_LEVEL_MAX && level <= _gst_debug_min)) {
+ if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) {
gst_debug_log_valist (cat, level, "", "", 0, (GObject *) object, format,
varargs);
}
--
2.9.3

View File

@ -25,6 +25,7 @@ Source0: http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-%{versi
## For GStreamer RPM provides
Patch0: gstreamer-inspect-rpm-format.patch
Patch1: 0001-deviceproviderfactory-fix-empty-class-check.patch
Patch2: 0001-info-put-around-macro-arguments.patch
Source1: gstreamer1.prov
Source2: gstreamer1.attr
@ -94,6 +95,7 @@ GStreamer streaming media framework.
%setup -q -n gstreamer-%{version}
%patch0 -p1 -b .rpm-provides
%patch1 -p1 -b .0001
%patch2 -p1 -b .0002
%build