Bug 1264892: Use system declaration of |__system_property_get| on B2G, r=padenot
authorThomas Zimmermann <tdz@users.sourceforge.net>
Mon, 18 Apr 2016 14:32:29 +0200
changeset 331466 fa0b7eb8c9075aa854650f164004ca0ba3035deb
parent 331465 72e36db09b3a4e61332af101d8eb7ca3f8efb329
child 331467 a6eb4d3e373fbe117d1c527ed5cfcdabf8ef1f29
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1264892
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1264892: Use system declaration of |__system_property_get| on B2G, r=padenot
media/libcubeb/src/cubeb_opensl.c
--- a/media/libcubeb/src/cubeb_opensl.c
+++ b/media/libcubeb/src/cubeb_opensl.c
@@ -180,18 +180,22 @@ convert_stream_type_to_sl_stream(cubeb_s
   default:
     return 0xFFFFFFFF;
   }
 }
 #endif
 
 static void opensl_destroy(cubeb * ctx);
 
+
 #if defined(__ANDROID__)
 
+// B2G header file still contain the required function declarations.
+#ifndef MOZ_WIDGET_GONK
+
 #if (__ANDROID_API__ >= ANDROID_VERSION_LOLLIPOP)
 typedef int (system_property_get)(const char*, char*);
 
 static int
 __system_property_get(const char* name, char* value)
 {
   void* libc = dlopen("libc.so", RTLD_LAZY);
   if (!libc) {
@@ -204,16 +208,18 @@ static int
   if (func) {
     ret = func(name, value);
   }
   dlclose(libc);
   return ret;
 }
 #endif
 
+#endif // MOZ_WIDGET_GONK
+
 static int
 get_android_version(void)
 {
   char version_string[PROP_VALUE_MAX];
 
   memset(version_string, 0, PROP_VALUE_MAX);
 
   int len = __system_property_get("ro.build.version.sdk", version_string);