Re: [PATCH] pg_regress.c: Fix "make check" on Mac OS X: Pass DYLD_LIBRARY_PATH

From: David Zhang <david(dot)zhang(at)highgo(dot)ca>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] pg_regress.c: Fix "make check" on Mac OS X: Pass DYLD_LIBRARY_PATH
Date: 2023-06-16 21:25:12
Message-ID: 168695071271.357334.2585593529574745046.pgcf@coridan.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have applied the patch to the latest master branch and successfully executed './configure && make && make check' on macOS Ventura. However, during the process, a warning was encountered: "mixing declarations and code is incompatible with standards before C99 [-Wdeclaration-after-statement]". Moving the declaration of 'result' to the beginning like below can resolve the warning, and it would be better to use a unique variable instead of 'result'.

#ifdef __darwin__
static char extra_envvars[4096];
+int result = -1;
... ...
-int result = snprintf(extra_envvars, sizeof(extra_envvars), "DYLD_LIBRARY_PATH=%s",
+result = snprintf(extra_envvars, sizeof(extra_envvars), "DYLD_LIBRARY_PATH=%s",

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2023-06-16 21:42:26 Re: [17] collation provider "builtin"
Previous Message Andres Freund 2023-06-16 21:16:28 Re: [PATCH] Missing dep on Catalog.pm in meson rules