Re: Compilation issue on Solaris.

From: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Compilation issue on Solaris.
Date: 2022-07-09 02:01:35
Message-ID: CALtqXTdc5jn2fcGgcP8zqAJrp=RKmeL3TpS=q7GBniXYsi35MQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jul 9, 2022 at 6:46 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com> writes:
> > While compiling the PostgreSQL I have found that *memset_s function
> > requires a define "*__STDC_WANT_LIB_EXT1__*" *
> > *explicit_bzero.c:* In function ‘*explicit_bzero*’:
> > *explicit_bzero.c:23:9:* *warning: *implicit declaration of function ‘
> > *memset_s*’; did you mean ‘*memset*’? [*-Wimplicit-function-declaration*]
>
> Hmm.
>
> > Attached is the patch to define that in the case of Solaris.
>
> If you don't have any test you want to make before adding the
> #define, I don't think this is idiomatic use of autoconf.
> Personally I'd have just added "-D__STDC_WANT_LIB_EXT1__" into
> the CPPFLAGS for Solaris, perhaps in src/template/solaris,
> or maybe just adjust the stanza immediately above this one:
>
> if test "$PORTNAME" = "solaris"; then
> CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
> fi
>
> regards, tom lane
>

Thanks for looking at that, yes you are right, the attached patch do that
now

if test "$PORTNAME" = "solaris"; then

CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"

+ CPPFLAGS="$CPPFLAGS -D__STDC_WANT_LIB_EXT1__"

fi

--
Ibrar Ahmed

Attachment Content-Type Size
solaris_memset_s_v2.patch application/octet-stream 403 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-07-09 02:07:46 Re: Eliminating SPI from RI triggers - take 2
Previous Message Bruce Momjian 2022-07-09 01:54:35 Re: doc: Fix description of how the default user name is chosen