Commit 7d5ff0b7 authored by Alex Blasche's avatar Alex Blasche
Browse files

Make bluez compile test pass again


The compiler error is:

In file included from main.cpp:29:0:
main.cpp: In function 'int main()'
main.cpp:33:11: error: taking address of temporary [-fpermissive]
     bacmp(BDADDR_ANY, BDADDR_NONE);
           ^
main.cpp:33:23: error: 'BDADDR_NONE' was not declared in this scope
     bacmp(BDADDR_ANY, BDADDR_NONE);

BDADDR_NONE only exists in Linux iBluetooth kernel headers but not in the
Bluez project headers. Furthermore the usage of the BDADDR_* defines
is known to trigger -fpermissive violations. For the prupose of this test
fpermissive is not relevant as the test is never executed and the focus
is in checking the existence of the very same defines.

Change-Id: I56db5406ec91fdd5e7998cac4900ee9f9b628c00
Reviewed-by: default avatarTimur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: default avatarJérôme Duval <jerome.duval@gmail.com>
Showing with 9 additions and 0 deletions
SOURCES += main.cpp SOURCES += main.cpp
# test checks existence of certain bluez defines whose
# usage is known to violate the permissive test
QMAKE_CXXFLAGS += -fpermissive
...@@ -30,6 +30,11 @@ ...@@ -30,6 +30,11 @@
int main() int main()
{ {
#ifdef BDADDR_NONE
bacmp(BDADDR_ANY, BDADDR_NONE); bacmp(BDADDR_ANY, BDADDR_NONE);
#else
bacmp(BDADDR_ANY, BDADDR_LOCAL);
#endif
return 0; return 0;
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment