From 7aad8c55a3ee1a379dc0fcd353a6bf42bec97cf3 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Thu, 31 May 2012 22:44:30 +0100 Subject: [PATCH] Fix build on systems without O_CLOEXEC Signed-off-by: David Woodhouse --- gnutls.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gnutls.c b/gnutls.c index 9cdab8d..9e5e0af 100644 --- a/gnutls.c +++ b/gnutls.c @@ -246,6 +246,12 @@ static int check_certificate_expiry(struct openconnect_info *vpninfo, gnutls_x50 return 0; } +/* For systems that don't support O_CLOEXEC, just don't bother. + It's not open for long anyway. */ +#ifndef O_CLOEXEC +#define O_CLOEXEC +#endif + static int load_datum(struct openconnect_info *vpninfo, gnutls_datum_t *datum, const char *fname) { -- 2.7.4