[mingw-dbus: 8/12] Added patch to prevent redeclaration of the symbol ELEMENT_TYPE

epienbro epienbro at fedoraproject.org
Wed Mar 7 16:31:00 UTC 2012


commit 077e0b9a27e5edc2eed3cbd8f17808edaea25c3f
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Tue Feb 28 00:39:11 2012 +0100

    Added patch to prevent redeclaration of the symbol ELEMENT_TYPE

 ...lict-with-element-type-from-mingw-headers.patch |   14 ++++++++++++++
 mingw32-dbus.spec                                  |    5 +++++
 2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/dbus-prevent-conflict-with-element-type-from-mingw-headers.patch b/dbus-prevent-conflict-with-element-type-from-mingw-headers.patch
new file mode 100644
index 0000000..78b7b87
--- /dev/null
+++ b/dbus-prevent-conflict-with-element-type-from-mingw-headers.patch
@@ -0,0 +1,14 @@
+--- dbus/dbus-sysdeps-win.h.orig	2012-02-28 00:34:36.076115260 +0100
++++ dbus/dbus-sysdeps-win.h	2012-02-28 00:35:13.562789154 +0100
+@@ -33,8 +33,11 @@
+ #include "dbus-string.h"
+ #include <ctype.h>
+ #include <malloc.h>
++
++#define ELEMENT_TYPE ELEMENT_TYPE_MS
+ #include <windows.h>
+ #undef interface
++#undef ELEMENT_TYPE
+ 
+ #define DBUS_CONSOLE_DIR "/var/run/console/"
+ 
diff --git a/mingw32-dbus.spec b/mingw32-dbus.spec
index 9c2e04b..d0698cd 100644
--- a/mingw32-dbus.spec
+++ b/mingw32-dbus.spec
@@ -30,6 +30,9 @@ Requires:       pkgconfig
 # Upstream patch: sysdeps-win needs _dbus_path_is_absolute
 Patch0:        dbus-1.4.6-path-is-absolute.patch
 
+# One of the files uses ELEMENT_TYPE while this is already used in the mingw-w64 headers
+Patch1:        dbus-prevent-conflict-with-element-type-from-mingw-headers.patch
+
 %description
 D-BUS is a system for sending messages between applications. It is
 used both for the system wide message bus service, and as a
@@ -52,6 +55,7 @@ Static version of MinGW Windows port of DBus library
 %prep
 %setup -q -n dbus-%{version}
 %patch0 -p1
+%patch1 -p0
 
 %build
 %{_mingw32_configure}
@@ -89,6 +93,7 @@ rm -r $RPM_BUILD_ROOT%{_mingw32_sysconfdir}/rc.d/init.d/messagebus
 %changelog
 * Mon Feb 27 2012 Erik van Pienbroek <epienbro at fedoraproject.org> - 1.4.6-3
 - Rebuild against the mingw-w64 toolchain
+- Added patch to prevent redeclaration of the symbol ELEMENT_TYPE
 
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.4.6-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild


More information about the scm-commits mailing list