summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-04-14 17:35:14 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2016-04-14 17:35:14 +0100
commit490f424e8cc098f0330d140d1db8c92c8723866c (patch)
tree2112da66ee7844da8c50119972b1fada0e9e13e2
parenta5bdc7ee1e3d69ff9e32987a58ebae94043db9e2 (diff)
Fix Solaris build
-rw-r--r--src/src/os.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/src/os.c b/src/src/os.c
index b0adc587a..f8b8f6e9a 100644
--- a/src/src/os.c
+++ b/src/src/os.c
@@ -874,12 +874,12 @@ return getcwd((char *)buffer, size);
unsigned char *
os_getcwd(unsigned char * buffer, size_t size)
{
-void *rc;
+char * b = (char *)buffer;
if (!size) size = PATH_MAX;
-if (!buffer && !(buffer = US malloc(size))) return NULL;
-if (!(buffer = getcwd((char *)buffer, size))) return NULL;
-return realloc((char *)buffer, strlen(buffer) + 1);
+if (!b && !(b = malloc(size))) return NULL;
+if (!(b = getcwd(b, size))) return NULL;
+return realloc(b, strlen(b) + 1);
}
#endif