[PATCH 2/3] android: fix building errors of the 64-bit targets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Some functions prototypes are not implicitly declared for
the Android 6.0 64-bit targets:

  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/hal-ipc.c:143:3: warning: incompatible implicit declaration of built-in function 'memset'
  external/bluetooth/bluez/android/hal-ipc.c:158:4: error: implicit declaration of function 'strerror' [-Werror=implicit-function-declaration]
      error("Receiving notifications failed: %s",
      ^
  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@xxxxxxxxxxxx>
---
 android/hal-ipc.c | 2 ++
 android/log.c     | 1 +
 2 files changed, 3 insertions(+)

diff --git a/android/hal-ipc.c b/android/hal-ipc.c
index 363072c..474ccb7 100644
--- a/android/hal-ipc.c
+++ b/android/hal-ipc.c
@@ -17,6 +17,7 @@
 
 #include <pthread.h>
 #include <errno.h>
+#include <error.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <stdbool.h>
@@ -24,6 +25,7 @@
 #include <unistd.h>
 #include <stdint.h>
 #include <stdlib.h>
+#include <string.h>
 
 #include <cutils/properties.h>
 
diff --git a/android/log.c b/android/log.c
index 35917c6..dfbd48b 100644
--- a/android/log.c
+++ b/android/log.c
@@ -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>
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux