From: Marcel Holtmann <marcel@holtmann.org>
To: Patrick Ohly <patrick.ohly@intel.com>
Cc: linux-bluetooth@vger.kernel.org, Milan Crha <mcrha@redhat.com>,
ying.an.deng@intel.com, ulf.hofemeier@intel.com,
ning.w.wang@intel.com
Subject: Re: bluez 4.97: build failure when used in C++ apps
Date: Mon, 16 Jan 2012 10:24:05 +0100 [thread overview]
Message-ID: <1326705845.6454.274.camel@aeonflux> (raw)
In-Reply-To: <1326702341.3360.107.camel@pohly-mobl1.fritz.box>
Hi Patrick,
> Bluez 4.97 has entered some distros recently (Fedora Core, MeeGo 1.2
> update), which broke compilation of the C++ code in SyncEvolution
> using /usr/lib/bluetooth.h.
>
> The compiler error is:
> /usr/include/bluetooth/bluetooth.h::131:9: error: invalid conversion from 'void*' to 'bt_get_le64(void*)::<anonymous struct>*'
> ...
>
> The reason is that C++, in contrast to C, does not allow conversion of
> void * to anything, and this code gets compiled as C++ when the app is
> written in C++. The macro with the assignment itself is older, but only
> recent Bluez starts to use it in inline functions, thus triggering the
> problem.
>
> Attached is a proposed solution. Note that I have only verified that it
> now compiles in C and C++, I have not actually tested the resulting
> Bluez, because compilation fails for me on Debian Testing for another
> reason (libcheck.a linked into shared object, doesn't work because not
> relocatable).
please can we get inline patches from git format-patch. Also this topic
has been raised before and I need confirmation for a GCC guru to confirm
that this does exactly the same all all platforms.
Tested this on x86 hardware is useless since it does unaligned access
properly anyway. ARM, MIPS and PowerPC would be interesting.
Regards
Marcel
next prev parent reply other threads:[~2012-01-16 9:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 8:25 bluez 4.97: build failure when used in C++ apps Patrick Ohly
2012-01-16 8:48 ` Deng, Ying An
2012-01-16 9:24 ` Marcel Holtmann [this message]
2012-01-16 10:09 ` Patrick Ohly
2012-02-05 10:56 ` Patrick Ohly
2012-02-05 10:57 ` [PATCH] bluetooth.h: fix compile issue in C++ with ifdef Patrick Ohly
2012-02-05 11:07 ` Rohan Garg
2012-02-05 11:33 ` Patrick Ohly
2012-02-05 11:33 ` Rohan Garg
2012-02-05 12:23 ` Rohan Garg
2012-02-05 12:28 ` Rohan Garg
2012-02-05 10:59 ` bluez 4.97: build failure when used in C++ apps Rohan Garg
2012-02-05 12:02 ` Rohan Garg
2012-02-06 8:46 ` Milan Crha
2012-02-06 9:29 ` Patrick Ohly
2012-02-06 9:51 ` Milan Crha
2012-02-05 14:29 ` Tino Keitel
2012-02-05 14:50 ` Rohan Garg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1326705845.6454.274.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=mcrha@redhat.com \
--cc=ning.w.wang@intel.com \
--cc=patrick.ohly@intel.com \
--cc=ulf.hofemeier@intel.com \
--cc=ying.an.deng@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).