Thread (3 messages) 3 messages, 3 authors, 2012-07-27

Re: [PATCH] bluetooth.h: fix compile issue when using in C++

From: Patrick Ohly <hidden>
Date: 2012-03-05 13:12:47

On Mon, 2012-03-05 at 09:31 +0100, Markus Rathgeb wrote:
Before you are applying the patch, could you also have a look at:
http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
That's a second C++ problem with the header file. With typeof and -std=c
++0x I get an error, as you said.

I'm fine with using __typeof__ instead of typeof. I verified that g++
4.6.2 and clang++ 3.0 grok __typeof__, with and without -std=c++0x. I
also checked that gcc accepts it without -std, with -std=gnu89, and with
-std=c99. It rejects the header file with -std=c89 because of the inline
keyword.

Updated patch attached.

Note that Debian seems to have picked the older
http://marc.info/?l=linux-bluetooth&m=132644289619172&w=2 patch, the one
which removes __attribute__((packed)) and replaces the (void *) cast
with (struct __s *).

I think that shows that it is important that upstream includes a
solution, because otherwise distros will pick one randomly.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help