MSYS2-packages/openssh/openssh-7.3p1-msys2-setkey.patch
Johannes Schindelin 633933b513 openssh: update to 7.3p1
This update made the fix-man-install patch unnecessary and required
minor adjustments to the msys2 one (to avoid huge changes due to
autoconf tools updates resulting in vastly different generated files, we
simply call autoreconf after patching configure.ac).

Due to a recent export of setkey() in msys2-runtime-devel's stdlib.h
when _XOPEN_SOURCE is defined, we need to add a little work-around patch
that avoids clashing with crypt.h's declaration of the function of the
same name.

Suggested by Ryan Rode-Corrent.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2016-08-22 17:17:34 +02:00

35 lines
875 B
Diff

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