From: David Sommerseth Date: Wed, 10 Mar 2010 10:45:04 +0000 (+0100) Subject: On TARGET_LINUX define _GNU_SOURCE if not defined X-Git-Tag: v2.2-beta1~7^2~6^2~1^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=554d8d55b23c2ae4bc1d010c7e3128fdf30f9362;p=thirdparty%2Fopenvpn.git On TARGET_LINUX define _GNU_SOURCE if not defined 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. Signed-off-by: David Sommerseth Acked-by: James Yonan --- diff --git a/syshead.h b/syshead.h index 6e81103b2..fe6ae4b3c 100644 --- a/syshead.h +++ b/syshead.h @@ -85,6 +85,10 @@ #endif #ifdef HAVE_SYS_SOCKET_H +# if defined(TARGET_LINUX) && !defined(_GNU_SOURCE) + /* needed for peercred support on glibc-2.8 */ +# define _GNU_SOURCE +# endif #include #endif