From 490f424e8cc098f0330d140d1db8c92c8723866c Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 14 Apr 2016 17:35:14 +0100 Subject: [PATCH] Fix Solaris build --- src/src/os.c | 8 ++++---- 1 file 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 -- 2.25.1