Fix build on systems without O_CLOEXEC
authorDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 31 May 2012 21:44:30 +0000 (22:44 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 31 May 2012 21:44:30 +0000 (22:44 +0100)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
gnutls.c

index 9cdab8d..9e5e0af 100644 (file)
--- 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)
 {