From 02ae811bd08e092f25fdf9f35f11affbc22f8fba Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Wed, 17 Dec 2014 15:14:33 +0100 Subject: [PATCH] tools: Fix hcitool build on Android target thumb C: hcitool <= external/bluetooth/bluez/tools/hcitool.c external/bluetooth/bluez/tools/hcitool.c: In function 'str2buf': external/bluetooth/bluez/tools/hcitool.c:83:2: warning: implicit declaration of function 'MIN' [-Wimplicit-function-declaration] target Executable: hcitool (out/target/product/mako/obj/EXECUTABLES/ hcitool_intermediates/LINKED/hcitool) external/bluetooth/bluez/tools/hcitool.c:83: error: undefined reference to 'MIN' collect2: error: ld returned 1 exit status --- tools/hcitool.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/hcitool.c b/tools/hcitool.c index 2cd76a529..648a0f7d6 100644 --- a/tools/hcitool.c +++ b/tools/hcitool.c @@ -46,6 +46,10 @@ #include "src/oui.h" +#ifndef MIN +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#endif + /* Unofficial value, might still change */ #define LE_LINK 0x80 -- 2.47.3