diff options
author | Andreas Gampe <agampe@google.com> | 2015-02-03 11:25:26 -0800 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-02-03 11:25:26 -0800 |
commit | fe2fb359d6f9df746a9bccbe9cbb271bd42feadd (patch) | |
tree | 238311ec03a239faf0a33d760262732051432c3f /init | |
parent | 6a728fde77d1367318c79e5b182f0cb316872a37 (diff) | |
download | system_core-fe2fb359d6f9df746a9bccbe9cbb271bd42feadd.zip system_core-fe2fb359d6f9df746a9bccbe9cbb271bd42feadd.tar.gz system_core-fe2fb359d6f9df746a9bccbe9cbb271bd42feadd.tar.bz2 |
Init: Fix Clang unsupported attributes
Make attributes conditional on not compiling with Clang.
Change-Id: Ic4e9b382308651c7b1901bfa192b6591672dc5ab
Diffstat (limited to 'init')
-rw-r--r-- | init/property_service.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/init/property_service.h b/init/property_service.h index 730495e..ff8b063 100644 --- a/init/property_service.h +++ b/init/property_service.h @@ -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); |