From: Jeremy Harris Date: Thu, 14 Apr 2016 16:35:14 +0000 (+0100) Subject: Fix Solaris build X-Git-Tag: exim-4_88_RC1~117 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/490f424e8cc098f0330d140d1db8c92c8723866c?hp=a5bdc7ee1e3d69ff9e32987a58ebae94043db9e2 Fix Solaris build --- 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