Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f2be400 authored by Chris Manton's avatar Chris Manton
Browse files

btif_hh_test: Link with OsiCompatSources

Bug: 311714808
Test: atest net_test_btif_hh

Change-Id: If882fbb7fdec1086431ee8f9f863fe14300fc8e9
parent 8f4ff99a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -579,6 +579,7 @@ cc_test {
    srcs: [
        ":BtaDmSources",
        ":LibBluetoothSources",
        ":OsiCompatSources",
        ":TestCommonCoreInterface",
        ":TestCommonMainHandler",
        ":TestCommonMockFunctions",
+0 −26
Original line number Diff line number Diff line
@@ -67,32 +67,6 @@ extern bool bluetooth_shim_is_gd_stack_started_up;
}
}  // namespace test

#if __GLIBC__
size_t strlcpy(char* dst, const char* src, size_t siz) {
  char* d = dst;
  const char* s = src;
  size_t n = siz;

  /* Copy as many bytes as will fit */
  if (n != 0) {
    while (--n != 0) {
      if ((*d++ = *s++) == '\0') break;
    }
  }

  /* Not enough room in dst, add NUL and traverse rest of src */
  if (n == 0) {
    if (siz != 0) *d = '\0'; /* NUL-terminate dst */
    while (*s++)
      ;
  }

  return (s - src - 1); /* count does not include NUL */
}

pid_t gettid(void) throw() { return syscall(SYS_gettid); }
#endif

namespace {
std::array<uint8_t, 32> data32 = {
    0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b,