diff options
Diffstat (limited to 'include/stdlib.h')
| -rw-r--r-- | include/stdlib.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/stdlib.h b/include/stdlib.h index c95bb55..bb10a7f 100644 --- a/include/stdlib.h +++ b/include/stdlib.h | |||
| @@ -45,6 +45,7 @@ _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r) | |||
| 45 | #ifndef PATH_MAX | 45 | #ifndef PATH_MAX |
| 46 | /* see man realpath(3) */ | 46 | /* see man realpath(3) */ |
| 47 | #define PATH_MAX 4096 | 47 | #define PATH_MAX 4096 |
| 48 | #define _FORTIFY_UNDEF_PATH_MAX | ||
| 48 | #endif | 49 | #endif |
| 49 | if (__r && PATH_MAX > __bos(__r, 2)) { | 50 | if (__r && PATH_MAX > __bos(__r, 2)) { |
| 50 | char __buf[PATH_MAX], *__ret; | 51 | char __buf[PATH_MAX], *__ret; |
| @@ -61,6 +62,10 @@ _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r) | |||
| 61 | } | 62 | } |
| 62 | return __orig_realpath(__p, __r); | 63 | return __orig_realpath(__p, __r); |
| 63 | } | 64 | } |
| 65 | #ifdef _FORTIFY_UNDEF_PATH_MAX | ||
| 66 | #undef PATH_MAX | ||
| 67 | #undef _FORTIFY_UNDEF_PATH_MAX | ||
| 68 | #endif | ||
| 64 | #endif | 69 | #endif |
| 65 | 70 | ||
| 66 | #ifdef __cplusplus | 71 | #ifdef __cplusplus |
