diff options
| -rw-r--r-- | include/stdlib.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index 22f1f2b..6629652 100644 --- a/include/stdlib.h +++ b/include/stdlib.h | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | #ifndef _FORTIFY_STDLIB_H | 1 | #ifndef _FORTIFY_STDLIB_H |
| 2 | #define _FORTIFY_STDLIB_H | 2 | #define _FORTIFY_STDLIB_H |
| 3 | 3 | ||
| 4 | #include_next <stdlib.h> | ||
| 5 | |||
| 4 | #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) | 6 | #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
| 5 | #include_next <limits.h> | 7 | #include_next <limits.h> |
| 6 | #endif | 8 | #endif |
| 7 | 9 | ||
| 8 | #include_next <stdlib.h> | ||
| 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 | 11 | ||
| 12 | #ifdef __cplusplus | 12 | #ifdef __cplusplus |
| @@ -23,7 +23,7 @@ char *realpath(const char *path, char *resolved) | |||
| 23 | 23 | ||
| 24 | if (resolved) { | 24 | if (resolved) { |
| 25 | #ifndef PATH_MAX | 25 | #ifndef PATH_MAX |
| 26 | __builtin_trap(); | 26 | # error PATH_MAX unset. A fortified realpath will not work. |
| 27 | #else | 27 | #else |
| 28 | bos = __builtin_object_size(resolved, 0); | 28 | bos = __builtin_object_size(resolved, 0); |
| 29 | if (PATH_MAX > bos) | 29 | if (PATH_MAX > bos) |
