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(-) diff --git a/syshead.h b/syshead.h index 6e81103..fe6ae4b 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 <sys/socket.h> #endif -- 1.6.6.1