Commit ec28cad6 authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 716825 - Avoid loading system libraries with their full path. r=bjacob,r=gal,r=blassey

parent 2877e80c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ static bool init() {
  if (gSurfaceFunctions.initialized)
    return true;

  void* handle = dlopen("/system/lib/libsurfaceflinger_client.so", RTLD_LAZY);
  void* handle = dlopen("libsurfaceflinger_client.so", RTLD_LAZY);

  if (!handle) {
    LOG("Failed to open libsurfaceflinger_client.so");
@@ -176,7 +176,7 @@ static bool init() {
  gSurfaceFunctions.lock = (int (*)(void*, SurfaceInfo*, void*))dlsym(handle, "_ZN7android7Surface4lockEPNS0_11SurfaceInfoEPNS_6RegionEb");
  gSurfaceFunctions.unlockAndPost = (int (*)(void*))dlsym(handle, "_ZN7android7Surface13unlockAndPostEv");

  handle = dlopen("/system/lib/libui.so", RTLD_LAZY);
  handle = dlopen("libui.so", RTLD_LAZY);
  if (!handle) {
    LOG("Failed to open libui.so");
    return false;
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
"use strict";

let libcutils = (function () {
  let library = ctypes.open("/system/lib/libcutils.so");
  let library = ctypes.open("libcutils.so");

  return {
    property_get: library.declare("property_get", ctypes.default_abi, ctypes.int, ctypes.char.ptr, ctypes.char.ptr, ctypes.char.ptr),
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
"use strict";

let libhardware_legacy = (function () {
  let library = ctypes.open("/system/lib/libhardware_legacy.so");
  let library = ctypes.open("libhardware_legacy.so");

  return {
    // Load wifi driver, 0 on success, < 0 on failure.
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
"use strict";

let libnetutils = (function () {
  let library = ctypes.open("/system/lib/libnetutils.so");
  let library = ctypes.open("libnetutils.so");

  return {
    ifc_enable: library.declare("ifc_enable", ctypes.default_abi, ctypes.int, ctypes.char.ptr),
+4 −4
Original line number Diff line number Diff line
@@ -69,11 +69,11 @@
#include "AndroidBridge.h"
#endif
#include <android/log.h>
#define EGL_LIB "/system/lib/libEGL.so"
#define GLES2_LIB "/system/lib/libGLESv2.so"
#define EGL_LIB "libEGL.so"
#define GLES2_LIB "libGLESv2.so"
#else
#define EGL_LIB "/usr/lib/libEGL.so"
#define GLES2_LIB "/usr/lib/libGLESv2.so"
#define EGL_LIB "libEGL.so.1"
#define GLES2_LIB "libGLESv2.so.2"
#endif

typedef void *EGLNativeDisplayType;
Loading