diff --git a/lib/mgmt.h b/lib/mgmt.h
index e28005e..f888220 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
return "<unknown status>";
return mgmt_status[status];
}
+
+static inline bool mgmt_powered(uint32_t settings)
+{
+ return (settings & MGMT_SETTING_POWERED);
+}
+
+static inline bool mgmt_connectable(uint32_t settings)
+{
+ return (settings & MGMT_SETTING_CONNECTABLE);
+}
+
+static inline bool mgmt_fast_connectable(uint32_t settings)
+{
+ return (settings & MGMT_SETTING_FAST_CONNECTABLE);
+}
+
+static inline bool mgmt_discoverable(uint32_t settings)
+{
+ return (settings & MGMT_SETTING_DISCOVERABLE);
+}
+
+static inline bool mgmt_pairable(uint32_t settings)
+{
+ return (settings & MGMT_SETTING_PAIRABLE);
+}
+
+static inline bool mgmt_ssp(uint32_t settings)
+{
+ return (settings & MGMT_SETTING_SSP);
+}
+
+static inline int mgmt_bredr(uint32_t settings)
+{
+ return (settings & MGMT_SETTING_BREDR) != 0;
+}
+
+static inline int mgmt_high_speed(uint32_t settings)
+{
+ return (settings & MGMT_SETTING_HS) != 0;
+}
+
+static inline int mgmt_low_energy(uint32_t settings)
+{
+ return (settings & MGMT_SETTING_LE) != 0;
+}
diff --git a/monitor/control.c b/monitor/control.c
index 9b76038..021409b 100644
--- a/monitor/control.c
+++ b/monitor/control.c
#endif
#include <stdio.h>
+#include <stdbool.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
diff --git a/src/mgmt.c b/src/mgmt.c
index 08bceb3..1a22982 100644
--- a/src/mgmt.c
+++ b/src/mgmt.c
return mgmt_set_mode(index, MGMT_OP_SET_LE, le);
}
-static inline int mgmt_powered(uint32_t settings)
-{
- return (settings & MGMT_SETTING_POWERED) != 0;
-}
-
-static inline int mgmt_connectable(uint32_t settings)
-{
- return (settings & MGMT_SETTING_CONNECTABLE) != 0;
-}
-
-static inline int mgmt_fast_connectable(uint32_t settings)
-{
- return (settings & MGMT_SETTING_FAST_CONNECTABLE) != 0;
-}
-
-static inline int mgmt_discoverable(uint32_t settings)
-{
- return (settings & MGMT_SETTING_DISCOVERABLE) != 0;
-}
-
-static inline int mgmt_pairable(uint32_t settings)
-{
- return (settings & MGMT_SETTING_PAIRABLE) != 0;
-}
-
-static inline int mgmt_ssp(uint32_t settings)
-{
- return (settings & MGMT_SETTING_SSP) != 0;
-}
-
-static inline int mgmt_bredr(uint32_t settings)
-{
- return (settings & MGMT_SETTING_BREDR) != 0;
-}
-
-static inline int mgmt_high_speed(uint32_t settings)
-{
- return (settings & MGMT_SETTING_HS) != 0;
-}
-
-static inline int mgmt_low_energy(uint32_t settings)
-{
- return (settings & MGMT_SETTING_LE) != 0;
-}
-
static void update_settings(struct btd_adapter *adapter, uint32_t settings)
{
DBG("new settings 0x%08x", settings);
diff --git a/src/shared/mgmt.c b/src/shared/mgmt.c
index 8fb7aa7..de63ae7 100644
--- a/src/shared/mgmt.c
+++ b/src/shared/mgmt.c
#include <stdio.h>
#include <unistd.h>
+#include <stdbool.h>
#include <glib.h>
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
index e91e078..4117e8c 100644
--- a/tools/mgmt-tester.c
+++ b/tools/mgmt-tester.c
#endif
#include <stdlib.h>
+#include <stdbool.h>
#include "lib/bluetooth.h"
#include "lib/mgmt.h"