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

Commit 9b816a88 authored by Jiyong Park's avatar Jiyong Park
Browse files

Cut the dependency to libnativeloader

This library does not use libnativeloader, but depends on it just to use
headers of the library, which declares some functions of libdl.

Cut the dependency to the library by declaring the functions in place.

Bug: 71349776
Test: m -j libgraphicsenv

Change-Id: I3728d5e964c167b62173a0cb555fe3fbbbe5fc92
parent b28c6742
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ cc_library_shared {
    cflags: ["-Wall", "-Werror"],

    shared_libs: [
        "libnativeloader",
        "liblog",
    ],

+12 −2
Original line number Diff line number Diff line
@@ -20,13 +20,23 @@

#include <mutex>

#include <android/dlext.h>
#include <log/log.h>
#include <nativeloader/dlext_namespaces.h>
#include <nativeloader/native_loader.h>

// TODO(b/37049319) Get this from a header once one exists
extern "C" {
  android_namespace_t* android_get_exported_namespace(const char*);
  android_namespace_t* android_create_namespace(const char* name,
                                                const char* ld_library_path,
                                                const char* default_library_path,
                                                uint64_t type,
                                                const char* permitted_when_isolated_path,
                                                android_namespace_t* parent);

  enum {
     ANDROID_NAMESPACE_TYPE_ISOLATED = 1,
     ANDROID_NAMESPACE_TYPE_SHARED = 2,
  };
}

namespace android {