#include "private/bionic_futex.h"
#include "private/bionic_lock.h"
#include "private/bionic_macros.h"
+#include "private/bionic_sdk_version.h"
#include "private/libc_logging.h"
static const char property_service_socket[] = "/dev/socket/" PROP_SERVICE_NAME;
int __system_property_area_init()
{
free_and_unmap_contexts();
- mkdir(property_filename, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+ mkdir(property_filename, S_IRWXU | S_IXGRP | S_IXOTH);
if (!initialize_properties()) {
return -1;
}
const prop_info *__system_property_find_nth(unsigned n)
{
+ if (bionic_get_application_target_sdk_version() >= __ANDROID_API_O__) {
+ __libc_fatal("__system_property_find_nth is not supported since Android O,"
+ " please use __system_property_foreach instead.");
+ }
+
find_nth_cookie cookie(n);
const int err = __system_property_foreach(find_nth_fn, &cookie);