summaryrefslogtreecommitdiff
path: root/utils/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/utils.c')
-rw-r--r--utils/utils.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/utils/utils.c b/utils/utils.c
index 346fd5585..c82bc2c74 100644
--- a/utils/utils.c
+++ b/utils/utils.c
@@ -490,3 +490,18 @@ int uname(struct utsname *buf) {
return 0;
}
#endif
+
+#ifndef HAVE_REALPATH
+char *realpath(const char *path, char *resolved_path)
+{
+ char *ret;
+ if (resolved_path == NULL) {
+ ret=strdup(path);
+ } else {
+ ret = resolved_path;
+ strcpy(resolved_path, path);
+ }
+ return ret;
+}
+
+#endif