am d4a6fc5b: Merge "Init: Fix Clang unsupported attributes"

* commit 'd4a6fc5bc205d516e5bf05cafc5b6eadb4e0b372':
  Init: Fix Clang unsupported attributes
This commit is contained in:
Elliott Hughes 2015-02-03 23:04:41 +00:00 committed by Android Git Automerger
commit 0642403c4f
1 changed files with 6 additions and 0 deletions

View File

@ -32,13 +32,19 @@ extern int property_set(const char *name, const char *value);
extern int properties_inited();
int get_property_set_fd(void);
#ifndef __clang__
extern void __property_get_size_error()
__attribute__((__error__("property_get called with too small buffer")));
#else
extern void __property_get_size_error();
#endif
static inline
__attribute__ ((always_inline))
__attribute__ ((gnu_inline))
#ifndef __clang__
__attribute__ ((artificial))
#endif
int property_get(const char *name, char *value)
{
size_t value_len = __builtin_object_size(value, 0);