From 0490e734e4023964d4662c07a5ac109747b8e0af Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Mon, 22 Aug 2016 17:09:20 +0200
Subject: [PATCH] openssh: work around Cygwin declaring setkey

When _XOPEN_SOURCE is defined, setkey() is declared in
/usr/include/stdlib.h in a manner that is incompatible with
/usr/include/crypt.h.

Let's work around that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 includes.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/includes.h b/includes.h
index 497a038..4f9e233 100644
--- a/includes.h
+++ b/includes.h
@@ -22,6 +22,10 @@
 #define _GNU_SOURCE /* activate extra prototypes for glibc */
 #endif
 
+#define setkey CYGWIN_setkey
+#include <stdlib.h>
+#undef setkey
+
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/socket.h> /* For CMSG_* */
-- 
2.9.1

