This is not the way to do it.

Use AC_USE_SYSTEM_EXTENSIONS in autoconf, which detects libc settings.

The current autoconf shape is poor, long ago I offered James to
rewrite it but he refused. I only made it partially work for cross
compile.

There are a lot of none standard/best practice stuff there.

I did fix automake stuff... :)

Alon.

On Wed, Mar 10, 2010 at 2:14 PM, David Sommerseth
<openvpn.l...@topphemmelig.net> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 10/03/10 11:49, David Sommerseth wrote:
> > From: David Sommerseth <d...@users.sourceforge.net>
> >
> > This is to include peercred support on hosts where _GNU_SOURCE is not
> > defined by default.  This issue has been found on Gentoo with glibc-2.8.
> >
> > The solution was discussed on the IRC meeting March 4, 2010
> > in #openvpn-discussions.
> > <http://thread.gmane.org/gmane.network.openvpn.devel/3242>
> >
> > Signed-off-by: David Sommerseth <d...@users.sourceforge.net>
> > ---
> >  syshead.h |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> >
>
> This is the "Gentoo patch", modified to be more generic.  In the IRC
> meeting I said I would try to make this change only in socket.c, but
> that was not possible.
>
> TARGET_LINUX is defined in config.h, and not available before syshead.h
> is included, as that is a wrapper which either includes config.h or
> config-win32.h, depending on OS.  Further defining _GNU_SOURCE after
> including syshead.h would not make any difference at all, as it needs to
> be defined before sys/socket.h is loaded.
>
> Therefore, I'd prefer a second review on this patch.
>
>
> kind regards,
>
> David Sommerseth
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkuXjQsACgkQDC186MBRfrorFQCePuxnsCBq3pIcPJ3mG1zZO2Y9
> 4FAAniyfy82e0vJhep0TUvQeI+7nzZsr
> =bTNV
> -----END PGP SIGNATURE-----
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to