28 lines
638 B
Diff
28 lines
638 B
Diff
--- a/vendor/selinux/libselinux/src/android/android_platform.c
|
|
+++ b/vendor/selinux/libselinux/src/android/android_platform.c
|
|
@@ -952,6 +952,24 @@
|
|
return rc;
|
|
}
|
|
|
|
+#if 1
|
|
+#include <dlfcn.h>
|
|
+int __system_properties_init(void)
|
|
+{
|
|
+ static int initialized = 0;
|
|
+ static int (*libc_impl)(void) = NULL;
|
|
+ if (!initialized) {
|
|
+ void *libc_handle = dlopen("libc.so", RTLD_NOW);
|
|
+ if (libc_handle != NULL)
|
|
+ libc_impl = dlsym(libc_handle, "__system_properties_init");
|
|
+ initialized = 1;
|
|
+ }
|
|
+ if (libc_impl != NULL)
|
|
+ return libc_impl();
|
|
+ return -1;
|
|
+}
|
|
+#endif
|
|
+
|
|
int selinux_android_setcon(const char *con)
|
|
{
|
|
int ret = setcon(con);
|