Re: PG 17.2 compilation fails with -std=c11 on mac

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Lakshmi Narayana Velayudam <dev(dot)narayana(dot)v(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PG 17.2 compilation fails with -std=c11 on mac
Date: 2025-05-16 20:58:05
Message-ID: 99307.1747429085@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> We lack that #define, which results in <string.h> not supplying
> the declaration. AFAICT the requirement for this is in the C11
> standard, this is not just Apple doing something weird.
> Aside from this compilation error, we're probably failing to use
> memset_s on some platforms where it's available, for lack of
> the #define in our configure/meson probes. I know how to fix
> that in configure, but I'm less clear on how nonstandard probes
> work in meson --- any help there?

Here's a lightly-tested fix for that (against HEAD, but it likely
works on v17 too).

regards, tom lane

Attachment Content-Type Size
memset_s_fix.patch text/x-patch 4.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2025-05-16 21:10:49 Re: Should we optimize the `ORDER BY random() LIMIT x` case?
Previous Message Hari Krishna Sunder 2025-05-16 18:47:12 Re: Statistics Import and Export