aboutsummaryrefslogtreecommitdiffstats
path: root/libc/include/sys/cdefs.h
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2012-06-07 14:01:26 -0700
committerNick Kralevich <nnk@google.com>2012-06-07 14:19:52 -0700
commit71a18dd435e96564539b5af71b8ea5093a2109a1 (patch)
treefd59c2a7cc23b663d090b0b8843a5d19c97df7d0 /libc/include/sys/cdefs.h
parent7d11009a970732ea18f8a0599d63c94eab9ec3f0 (diff)
downloadandroid_bionic-71a18dd435e96564539b5af71b8ea5093a2109a1.tar.gz
android_bionic-71a18dd435e96564539b5af71b8ea5093a2109a1.tar.bz2
android_bionic-71a18dd435e96564539b5af71b8ea5093a2109a1.zip
_FORTIFY_SOURCE: add memset / bzero support
Add _FORTIFY_SOURCE support for the following functions: * memset * bzero Move the __BIONIC_FORTIFY_INLINE definition to cdefs.h so it can be used from multiple header files. Change-Id: Iead4d5e35de6ec97786d58ee12573f9b11135bb7
Diffstat (limited to 'libc/include/sys/cdefs.h')
-rw-r--r--libc/include/sys/cdefs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 71b419ce4..1ba9100b9 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -501,4 +501,12 @@
#define __BIONIC__ 1
#include <android/api-level.h>
+#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
+#define __BIONIC_FORTIFY_INLINE \
+ extern inline \
+ __attribute__ ((always_inline)) \
+ __attribute__ ((gnu_inline)) \
+ __attribute__ ((artificial))
+#endif
+
#endif /* !_SYS_CDEFS_H_ */