diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/compat.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Src/compat.c b/Src/compat.c index 2f6628f33..27c9c740c 100644 --- a/Src/compat.c +++ b/Src/compat.c @@ -141,6 +141,19 @@ zpathmax(char *dir) } #endif +/**/ +mod_export char * +zrealpath(const char *path, char *resolved_path) +{ +#ifdef HAVE_REALPATH + return realpath(path, resolved_path); +#else /* the following block should be replaced with a realpath() equiv. */ + long pathmax; + + if ((pathmax = zpathmax(path)) > 0) + return strncpy(resolved_path, path, pathmax); +#endif +} /**/ mod_export char * |