Fixes: #409
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
}
#else
-#ifdef HAVE_POSIX_SPAWN
-#include <spawn.h>
-#endif
-
#include <ctype.h>
#define HPKE_TAG_PUBKEY 1
return TRUE;
}
#endif
+
#ifdef HAVE_POSIX_SPAWN
-#include <spawn.h>
static int spawn_browser(struct openconnect_info *vpninfo, const char *url, void *cbdata)
{
vpn_progress(vpninfo, PRG_TRACE,
#include <string.h>
#include <errno.h>
+#ifdef HAVE_POSIX_SPAWN
+#ifdef __APPLE__
+#include <crt_externs.h>
+#define environ (*_NSGetEnviron())
+#endif
+#include <spawn.h>
+#endif
+
/* Equivalent of "/dev/null" on Windows.
* See https://stackoverflow.com/a/44163934
*/