[openssh-commits] [openssh] 01/01: Move Cygwin IPPORT_RESERVED overrride to defines.h

git+noreply at mindrot.org git+noreply at mindrot.org
Sat Jul 23 16:16:15 AEST 2016


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 353766e0881f069aeca30275ab706cd60a1a8fdd
Author: Darren Tucker <dtucker at zip.com.au>
Date:   Sat Jul 23 16:14:42 2016 +1000

    Move Cygwin IPPORT_RESERVED overrride to defines.h
    
    Patch from vinschen at redhat.com.
---
 configure.ac |  2 --
 defines.h    | 13 +++++++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 21ef389..e64386f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -589,8 +589,6 @@ case "$host" in
 		[Define if you want to disable shadow passwords])
 	AC_DEFINE([NO_X11_UNIX_SOCKETS], [1],
 		[Define if X11 doesn't support AF_UNIX sockets on that system])
-	AC_DEFINE([IPPORT_RESERVED], [0],
-		[Cygwin has no notion of ports only accessible to superusers])
 	AC_DEFINE([DISABLE_FD_PASSING], [1],
 		[Define if your platform needs to skip post auth
 		file descriptor passing])
diff --git a/defines.h b/defines.h
index a438ddd..1b71d3e 100644
--- a/defines.h
+++ b/defines.h
@@ -43,6 +43,19 @@ enum
 #endif
 
 /*
+ * Cygwin doesn't really have a notion of reserved ports.  It is still
+ * is useful on the client side so for compatibility it defines as 1024 via
+ * netinet/in.h inside an enum.  We * don't actually want that restriction
+ * so we want to set that to zero, but we can't do it direct in config.h
+ * because it'll cause a conflicting definition the first time we include
+ * netinet/in.h.
+ */
+
+#ifdef HAVE_CYGWIN
+#define IPPORT_RESERVED 0
+#endif
+
+/*
  * Definitions for IP type of service (ip_tos)
  */
 #include <netinet/in_systm.h>

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list