aboutsummaryrefslogtreecommitdiff
path: root/ble/LinuxBluetooth.cpp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-07-21 19:59:48 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-07-21 19:59:48 +0200
commit33c537c84fea53c899fb5275256518598f66101e (patch)
tree51790ef4203ac21d469cac7eb3bf2f7b15ade146 /ble/LinuxBluetooth.cpp
parenta0d83abee95e0ba7fcb882c970a76576cd3afb81 (diff)
downloadble-toys-33c537c84fea53c899fb5275256518598f66101e.tar.gz
ble-toys-33c537c84fea53c899fb5275256518598f66101e.tar.bz2
ble-toys-33c537c84fea53c899fb5275256518598f66101e.tar.xz
ble-toys-33c537c84fea53c899fb5275256518598f66101e.zip
o Fixing compatability with libcxx.
Diffstat (limited to 'ble/LinuxBluetooth.cpp')
-rw-r--r--ble/LinuxBluetooth.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/ble/LinuxBluetooth.cpp b/ble/LinuxBluetooth.cpp
index 0c6c387..f662d45 100644
--- a/ble/LinuxBluetooth.cpp
+++ b/ble/LinuxBluetooth.cpp
@@ -6,6 +6,8 @@
#include <bluetooth/l2cap.h>
#include <map>
#include <iomanip>
+#include <sys/types.h>
+#include <sys/socket.h>
// Got to love magic constants. Taken from bluez.git/tools/btgatt-client.c
#define ATT_CID 4
@@ -168,7 +170,7 @@ void LinuxBluetoothGatt::connect() {
addr.l2_cid = htobs(ATT_CID);
addr.l2_bdaddr_type = BDADDR_LE_PUBLIC;
- if (bind(l2cap, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+ if (::bind(l2cap, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
close(l2cap);
throw BluetoothException(&device, "bind(): " + errnoAsString());
}