labapart / gattlib

Library to access GATT information from BLE (Bluetooth Low Energy) devices
http://labapart.com/
436 stars 157 forks source link

Add missing include #278

Closed davide125 closed 2 months ago

davide125 commented 2 months ago

Add missing include to fix implicit declaration issue:

/builddir/build/BUILD/gattlib-0.7.1/common/gattlib_common_adapter.c: In function ‘stricmp’:
/builddir/build/BUILD/gattlib-0.7.1/common/gattlib_common_adapter.c:15:17: error: implicit declaration of function ‘tolower’ [-Wimplicit-function-declaration]
   15 |         int d = tolower((unsigned char)*a) - tolower((unsigned char)*b);
      |                 ^~~~~~~
/builddir/build/BUILD/gattlib-0.7.1/common/gattlib_common_adapter.c:8:1: note: include ‘<ctype.h>’ or provide a declaration of ‘tolower’
    7 | #include "gattlib_internal.h"
  +++ |+#include <ctype.h>
    8 | 
gmake[2]: *** [dbus/CMakeFiles/gattlib.dir/build.make:215: dbus/CMakeFiles/gattlib.dir/__/common/gattlib_common_adapter.c.o] Error 1
oliviermartin commented 2 months ago

Thanks @davide125 for the contribution :-)