From: | Pradeep Kumar <spradeepkumar29(at)gmail(dot)com> |
---|---|
To: | Long Song <songlong88(at)126(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Need clarification on compilation errors in PG 16.2 |
Date: | 2024-05-28 07:10:47 |
Message-ID: | CAJ4xhP=cXKBe9na6AavMSTf40f25fV+3sScOBq9_STy5GYdrqw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Long,
>In fact, whether the HAVE_MEMSET_S macro is defined determines whether the
implementation
>of the explicit_bzero() function calls memset_s() or memset(). This macro
is undefined by default
>in pg_config.h, so check to see if your build environment has a
HAVE_MEMSET_S macro defined.
Yes it was defined in "pg_config.h"
/* Define to 1 if you have the `memset_s' function. */
#define HAVE_MEMSET_S 1
Thanks
On Tue, May 28, 2024 at 12:27 PM Long Song <songlong88(at)126(dot)com> wrote:
>
>
>
>
>
> Hi Pradeep,
>
>
> At 2024-05-28 12:37:08, "Pradeep Kumar" <spradeepkumar29(at)gmail(dot)com> wrote:
>
> > Hi ,
> > While we try to install PG 16.2 from the source code in macbook we
> getting this following errors
> > ```
> >
> > explicit_bzero.c:22:9: error: call to undeclared function 'memset_s';
> ISO C99 and later do not support implicit function declarations
> [-Wimplicit-function-declaration]
> > (void) memset_s(buf, len, 0, len);
> > ^
> > explicit_bzero.c:22:9: note: did you mean 'memset'?
> >
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.2.sdk/usr/include/string.h:74:7:
> note: 'memset' declared here
> > void memset(void __b, int __c, size_t __len);
> > ^
> > 1 error generated.
> > make[2]: *** [explicit_bzero.o] Error 1
> > make[2]: *** Waiting for unfinished jobs....
> > make[1]: *** [all-port-recurse] Error 2
> > make: *** [all-src-recurse] Error 2
> >
> > ```
> > then I changed the function memset_s(buf, len, 0, len) to memset(buf, 0,
> len) and it's working. need a clarification on this?
> In fact, whether the HAVE_MEMSET_S macro is defined determines whether the
> implementation
> of the explicit_bzero() function calls memset_s() or memset(). This macro
> is undefined by default
> in pg_config.h, so check to see if your build environment has a
> HAVE_MEMSET_S macro defined.
>
> Best Regards,
> Long
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2024-05-28 07:31:03 | why memoize is not used for correlated subquery |
Previous Message | Pradeep Kumar | 2024-05-28 06:46:20 | Re: Need clarification on compilation errors in PG 16.2 |