FS#43014 - [bluez-libs] Bluetooth header file not valid for c++11

Attached to Project: Arch Linux
Opened by Mikhail Burakov (Pyromaniac) - Friday, 05 December 2014, 08:53 GMT
Last edited by Andreas Radke (AndyRTR) - Sunday, 04 January 2015, 12:08 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Andreas Radke (AndyRTR)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Bluetooth header (/usr/include/bluetooth/bluetooth.h) is not valid in c++11 context.

Additional info:
Package bluez-libs 5.25-2 affected. Did not check any previous versions, but I believe they has the same issue.

Steps to reproduce:
[mburakov@mb-arch ~]$ LANG=C g++ -c /usr/include/bluetooth/bluetooth.h -o /dev/null 2>&1 | head
[mburakov@mb-arch ~]$ LANG=C g++ --std=c++11 -c /usr/include/bluetooth/bluetooth.h -o /dev/null 2>&1 | head
/usr/include/bluetooth/bluetooth.h: In function 'uint64_t bt_get_le64(const void*)':
/usr/include/bluetooth/bluetooth.h:161:10: error: expected identifier before '*' token
typeof(*(ptr)) __v; \
^
/usr/include/bluetooth/bluetooth.h:177:9: note: in expansion of macro 'bt_get_unaligned'
return bt_get_unaligned((const uint64_t *) ptr);
^
/usr/include/bluetooth/bluetooth.h:161:11: error: expected ',' or '...' before '(' token
typeof(*(ptr)) __v; \
^

Possible fix:
This patch fixes compilation: http://sophie.zarb.org/distrib/Mandriva/cooker/i586/by-pkgid/5b35b37acdb322b76141434ab236eb49/files/6
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Sunday, 04 January 2015, 12:08 GMT
Reason for closing:  Fixed
Comment by Andreas Radke (AndyRTR) - Sunday, 07 December 2014, 18:57 GMT
Please report such a bug upstream. I'm sure they will pick up the fix.
Comment by Andreas Radke (AndyRTR) - Sunday, 04 January 2015, 10:54 GMT
Have you reported this upstream so they are aware of it and can fix it in a future release?
Comment by Mikhail Burakov (Pyromaniac) - Sunday, 04 January 2015, 11:12 GMT
Hi! Looks like this is already fixed upstream according to their git repo:
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/lib/bluetooth.h?id=cf52a40302d0d20ccca22a7a1f53e46ef8abfca8

Release 5.26 includes this fix.

Loading...