summaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index 0336d56..c95bb55 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -43,8 +43,9 @@ __fortify_warning_if(__p == NULL, "'realpath' called with path set to `NULL`; di
43_FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r) 43_FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r)
44{ 44{
45#ifndef PATH_MAX 45#ifndef PATH_MAX
46#error PATH_MAX unset. A fortified realpath will not work. 46/* see man realpath(3) */
47#else 47#define PATH_MAX 4096
48#endif
48 if (__r && PATH_MAX > __bos(__r, 2)) { 49 if (__r && PATH_MAX > __bos(__r, 2)) {
49 char __buf[PATH_MAX], *__ret; 50 char __buf[PATH_MAX], *__ret;
50 size_t __l; 51 size_t __l;
@@ -59,7 +60,6 @@ _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r)
59 return __r; 60 return __r;
60 } 61 }
61 return __orig_realpath(__p, __r); 62 return __orig_realpath(__p, __r);
62#endif
63} 63}
64#endif 64#endif
65 65