summaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 0c4a7a6..16102ad 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -8,6 +8,7 @@
8#endif 8#endif
9 9
10#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 10#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
11#include "fortify-headers.h"
11 12
12#ifdef __cplusplus 13#ifdef __cplusplus
13extern "C" { 14extern "C" {
@@ -15,9 +16,7 @@ extern "C" {
15 16
16#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 17#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
17#undef realpath 18#undef realpath
18__typeof__(realpath) __realpath_orig __asm__(__USER_LABEL_PREFIX__ "realpath"); 19fortify_fn(realpath) char *realpath(const char *path, char *resolved)
19extern __inline __attribute__((__always_inline__,__gnu_inline__,__artificial__))
20char *realpath(const char *path, char *resolved)
21{ 20{
22 size_t bos; 21 size_t bos;
23 22
@@ -30,7 +29,7 @@ char *realpath(const char *path, char *resolved)
30 __builtin_trap(); 29 __builtin_trap();
31#endif 30#endif
32 } 31 }
33 return __realpath_orig(path, resolved); 32 return __orig_realpath(path, resolved);
34} 33}
35#endif 34#endif
36 35