Fix build on systems without O_CLOEXEC
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 25 Jun 2012 20:13:35 +0000 (22:13 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 25 Jun 2012 20:23:49 +0000 (21:23 +0100)
Reported by Ryan Steinmetz <zi@freebsd.org>

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
gnutls.c
www/changelog.xml

index 31d87b1..c90d6b8 100644 (file)
--- a/gnutls.c
+++ b/gnutls.c
@@ -239,7 +239,7 @@ static int check_certificate_expiry(struct openconnect_info *vpninfo, gnutls_x50
 /* 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
+#define O_CLOEXEC 0
 #endif
 
 static int load_datum(struct openconnect_info *vpninfo,
index 8b1b70a..d4307dc 100644 (file)
@@ -17,6 +17,7 @@
 <ul>
    <li><b>OpenConnect HEAD</b>
      <ul>
+       <li>Fix build on systems like FreeBSD 8 without <tt>O_CLOEXEC</tt>.</li>
        <li>Add <tt>--dtls-local-port</tt> option.</li>
        <li>Print correct error when <tt>/dev/net/tun</tt> cannot be opened.</li>
        <li>Fix <tt>openconnect.pc</tt> pkg-config file not to require <tt>zlib.pc</tt> on systems which lack it (like RHEL5).</li>