summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/stdio.h2
-rw-r--r--include/sys/select.h15
2 files changed, 5 insertions, 12 deletions
diff --git a/include/stdio.h b/include/stdio.h
index 1b244f4..9d29e94 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -153,7 +153,6 @@ _FORTIFY_FN(vsprintf) int vsprintf(char * _FORTIFY_POS0 __s, const char *__f,
153 return __r; 153 return __r;
154} 154}
155 155
156#if defined(__has_builtin)
157#if __has_builtin(__builtin_va_arg_pack) 156#if __has_builtin(__builtin_va_arg_pack)
158 157
159/* clang is missing __builtin_va_arg_pack, so we cannot use these impls 158/* clang is missing __builtin_va_arg_pack, so we cannot use these impls
@@ -203,7 +202,6 @@ _FORTIFY_FN(sprintf) int sprintf(char *__s, const char *__f, ...)
203} 202}
204 203
205#endif /* __has_builtin(__builtin_va_arg_pack) */ 204#endif /* __has_builtin(__builtin_va_arg_pack) */
206#endif /* defined(__has_builtin) */
207 205
208#ifdef __cplusplus 206#ifdef __cplusplus
209} 207}
diff --git a/include/sys/select.h b/include/sys/select.h
index 265c7e1..df32003 100644
--- a/include/sys/select.h
+++ b/include/sys/select.h
@@ -28,14 +28,10 @@ __extension__
28extern "C" { 28extern "C" {
29#endif 29#endif
30 30
31#ifdef __clang__ 31#define _STI static __inline__ \
32#define _FORTIFY_FD_POS0 const __attribute__((__pass_object_size__(0))) 32 __attribute__((__always_inline__,__gnu_inline__,__artificial__))
33#else
34#define _FORTIFY_FD_POS0
35#endif
36 33
37static __inline__ __attribute__((__always_inline__,__gnu_inline__,__artificial__)) 34_STI void __fortify_FD_CLR(int __f, fd_set * _FORTIFY_POS0 __s)
38void __fortify_FD_CLR(int __f, fd_set * _FORTIFY_FD_POS0 __s)
39{ 35{
40 size_t __b = __bos(__s, 0); 36 size_t __b = __bos(__s, 0);
41 37
@@ -44,8 +40,7 @@ void __fortify_FD_CLR(int __f, fd_set * _FORTIFY_FD_POS0 __s)
44 FD_CLR(__f, __s); 40 FD_CLR(__f, __s);
45} 41}
46 42
47static __inline__ __attribute__((__always_inline__,__gnu_inline__,__artificial__)) 43_STI void __fortify_FD_SET(int __f, fd_set * _FORTIFY_POS0 __s)
48void __fortify_FD_SET(int __f, fd_set * _FORTIFY_FD_POS0 __s)
49{ 44{
50 size_t __b = __bos(__s, 0); 45 size_t __b = __bos(__s, 0);
51 46
@@ -54,7 +49,7 @@ void __fortify_FD_SET(int __f, fd_set * _FORTIFY_FD_POS0 __s)
54 FD_SET(__f, __s); 49 FD_SET(__f, __s);
55} 50}
56 51
57#undef _FORTIFY_FD_POS0 52#undef _STI
58 53
59#undef FD_CLR 54#undef FD_CLR
60#define FD_CLR(fd, set) __fortify_FD_CLR(fd, set) 55#define FD_CLR(fd, set) __fortify_FD_CLR(fd, set)