[Pkg-bluetooth-commits] r1176 - in /packages/bluez/trunk/debian/patches: 09_fix_compile_with_C++.patch series
iwamatsu at users.alioth.debian.org
iwamatsu at users.alioth.debian.org
Wed Feb 1 18:15:00 UTC 2012
Author: iwamatsu
Date: Wed Feb 1 18:15:00 2012
New Revision: 1176
URL: http://svn.debian.org/wsvn/pkg-bluetooth/?sc=1&rev=1176
Log:
Fix build fail with C++. (Closes: 657531)
Add patches/09_fix_compile_with_C++.patch.
Added:
packages/bluez/trunk/debian/patches/09_fix_compile_with_C++.patch
Modified:
packages/bluez/trunk/debian/patches/series
Added: packages/bluez/trunk/debian/patches/09_fix_compile_with_C++.patch
URL: http://svn.debian.org/wsvn/pkg-bluetooth/packages/bluez/trunk/debian/patches/09_fix_compile_with_C%2B%2B.patch?rev=1176&op=file
==============================================================================
--- packages/bluez/trunk/debian/patches/09_fix_compile_with_C++.patch (added)
+++ packages/bluez/trunk/debian/patches/09_fix_compile_with_C++.patch Wed Feb 1 18:15:00 2012
@@ -1,0 +1,57 @@
+Description: Fix compilation of C++ programs that include <bluetooth/bluetooth.h>
+Bug-Debian: http://bugs.debian.org/657531
+Author: Szymon Janc <szymon.janc at ieto.com>
+Origin: upstream, not-apply, http://marc.info/?l=linux-bluetooth&m=132644289619172&w=2
+Last-Update: 2012-01-29
+
+# http://marc.info/?l=linux-bluetooth&m=132644289619172&w=2
+
+C++ doesn't allow for implicit conversion from void*.
+
+/usr/include/bluetooth/bluetooth.h: In function 窶�int64_t bt_get_le64(void*)窶:
+/usr/include/bluetooth/bluetooth.h:131: error: invalid conversion from 窶�oid*窶 to 窶話t_get_le64(void*)::<anonymous struct>*窶
+/usr/include/bluetooth/bluetooth.h: In function 窶�int64_t bt_get_be64(void*)窶:
+/usr/include/bluetooth/bluetooth.h:136: error: invalid conversion from 窶�oid*窶 to 窶話t_get_be64(void*)::<anonymous struct>*窶
+/usr/include/bluetooth/bluetooth.h: In function 窶�int32_t bt_get_le32(void*)窶:
+/usr/include/bluetooth/bluetooth.h:141: error: invalid conversion from 窶�oid*窶 to 窶話t_get_le32(void*)::<anonymous struct>*窶
+/usr/include/bluetooth/bluetooth.h: In function 窶�int32_t bt_get_be32(void*)窶:
+/usr/include/bluetooth/bluetooth.h:146: error: invalid conversion from 窶�oid*窶 to 窶話t_get_be32(void*)::<anonymous struct>*窶
+/usr/include/bluetooth/bluetooth.h: In function 窶�int16_t bt_get_le16(void*)窶:
+/usr/include/bluetooth/bluetooth.h:151: error: invalid conversion from 窶�oid*窶 to 窶話t_get_le16(void*)::<anonymous struct>*窶
+/usr/include/bluetooth/bluetooth.h: In function 窶�int16_t bt_get_be16(void*)窶:
+/usr/include/bluetooth/bluetooth.h:156: error: invalid conversion from 窶�oid*窶 to 窶話t_get_be16(void*)::<anonymous struct>*窶
+---
+ lib/bluetooth.h | 10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/lib/bluetooth.h b/lib/bluetooth.h
+index 5bd4f03..b4891ef 100644
+--- a/lib/bluetooth.h
++++ b/lib/bluetooth.h
+@@ -111,17 +111,19 @@ enum {
+ /* Bluetooth unaligned access */
+ #define bt_get_unaligned(ptr) \
+ ({ \
+- struct __attribute__((packed)) { \
++ struct __s { \
+ typeof(*(ptr)) __v; \
+- } *__p = (void *) (ptr); \
++ } __attribute__((packed)) ; \
++ struct __s *__p = (struct __s *) (ptr); \
+ __p->__v; \
+ })
+
+ #define bt_put_unaligned(val, ptr) \
+ do { \
+- struct __attribute__((packed)) { \
++ struct __s { \
+ typeof(*(ptr)) __v; \
+- } *__p = (void *) (ptr); \
++ }__attribute__((packed)) ; \
++ struct __s *__p = (struct __s *) (ptr); \
+ __p->__v = (val); \
+ } while(0)
+
+--
+on behalf of ST-Ericsson
+
Modified: packages/bluez/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-bluetooth/packages/bluez/trunk/debian/patches/series?rev=1176&op=diff
==============================================================================
--- packages/bluez/trunk/debian/patches/series (original)
+++ packages/bluez/trunk/debian/patches/series Wed Feb 1 18:15:00 2012
@@ -4,3 +4,4 @@
06-alsalib.patch
07-fix-639356.patch
# 08-0001-systemd-install-systemd-unit-files.patch
+09_fix_compile_with_C++.patch
More information about the Pkg-bluetooth-commits
mailing list