diff options
Diffstat (limited to 'libbb/xreadlink.c')
-rw-r--r-- | libbb/xreadlink.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c index 8d232f16b..faa0e1646 100644 --- a/libbb/xreadlink.c +++ b/libbb/xreadlink.c | |||
@@ -100,18 +100,16 @@ char* FAST_FUNC xmalloc_readlink_or_warn(const char *path) | |||
100 | return buf; | 100 | return buf; |
101 | } | 101 | } |
102 | 102 | ||
103 | /* UNUSED */ | ||
104 | #if 0 | ||
105 | char* FAST_FUNC xmalloc_realpath(const char *path) | 103 | char* FAST_FUNC xmalloc_realpath(const char *path) |
106 | { | 104 | { |
107 | #if defined(__GLIBC__) && !defined(__UCLIBC__) | 105 | #if defined(__GLIBC__) && !defined(__UCLIBC__) |
108 | /* glibc provides a non-standard extension */ | 106 | /* glibc provides a non-standard extension */ |
107 | /* new: POSIX.1-2008 specifies this behavior as well */ | ||
109 | return realpath(path, NULL); | 108 | return realpath(path, NULL); |
110 | #else | 109 | #else |
111 | char buf[PATH_MAX+1]; | 110 | char buf[PATH_MAX+1]; |
112 | 111 | ||
113 | /* on error returns NULL (xstrdup(NULL) ==NULL) */ | 112 | /* on error returns NULL (xstrdup(NULL) == NULL) */ |
114 | return xstrdup(realpath(path, buf)); | 113 | return xstrdup(realpath(path, buf)); |
115 | #endif | 114 | #endif |
116 | } | 115 | } |
117 | #endif | ||