OSDN Git Service

android: fix building errors of the 64-bit targets
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 9 Dec 2015 10:08:39 +0000 (18:08 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Thu, 1 Jun 2017 03:26:03 +0000 (11:26 +0800)
Some functions prototypes are not declared implicitly for
the Android 6.0 64-bit targets that result in the errors:

  external/bluetooth/bluez/android/hal-ipc.c: In function 'notification_handler':
  external/bluetooth/bluez/android/hal-ipc.c:143:3: error: implicit declaration of function 'memset' [-Werror=implicit-function-declaration]
     memset(&msg, 0, sizeof(msg));
     ^
  external/bluetooth/bluez/android/log.c: In function 'init_logd':
  external/bluetooth/bluez/android/log.c:175:2: error: implicit declaration of function 'memset' [-Werror=implicit-function-declaration]
    memset(&addr, 0, sizeof(addr));
    ^

Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
android/hal-ipc.c
android/log.c

index 363072c..9386192 100644 (file)
@@ -24,6 +24,7 @@
 #include <unistd.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include <cutils/properties.h>
 
index 35917c6..dfbd48b 100644 (file)
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include <stdbool.h>
 #include <time.h>