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

Commit 3dd3956d authored by Jakub Pawlowski's avatar Jakub Pawlowski
Browse files

Linux build fix

Test: compile using ninja
parent 0477ee56
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -40,6 +40,8 @@ static const char kBluetoothLibraryName[] = "libbluetooth.default.so";


static int load_bt_library(const struct hw_module_t **module) {
static int load_bt_library(const struct hw_module_t **module) {
  const char *id = BT_STACK_MODULE_ID;
  const char *id = BT_STACK_MODULE_ID;
  const char *sym = HAL_MODULE_INFO_SYM_AS_STR;
  struct hw_module_t *hmi = nullptr;


  // Always try to load the default Bluetooth stack on GN builds.
  // Always try to load the default Bluetooth stack on GN builds.
  void *handle = dlopen(kBluetoothLibraryName, RTLD_NOW);
  void *handle = dlopen(kBluetoothLibraryName, RTLD_NOW);
@@ -50,8 +52,7 @@ static int load_bt_library(const struct hw_module_t **module) {
  }
  }


  // Get the address of the struct hal_module_info.
  // Get the address of the struct hal_module_info.
  const char *sym = HAL_MODULE_INFO_SYM_AS_STR;
  hmi = (struct hw_module_t *)dlsym(handle, sym);
  struct hw_module_t *hmi = (struct hw_module_t *)dlsym(handle, sym);
  if (!hmi) {
  if (!hmi) {
    HULOGERR("%s", sym);
    HULOGERR("%s", sym);
    goto error;
    goto error;
+1 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,7 @@
#include <assert.h>
#include <assert.h>
#include <limits.h>
#include <limits.h>
#include <stdio.h>
#include <stdio.h>
#include <string.h>


#include "a2dp_api.h"
#include "a2dp_api.h"
#include "a2dp_sbc.h"
#include "a2dp_sbc.h"