]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Move Cygwin IPPORT_RESERVED overrride to defines.h
authorDarren Tucker <dtucker@zip.com.au>
Sat, 23 Jul 2016 06:14:42 +0000 (16:14 +1000)
committerDarren Tucker <dtucker@zip.com.au>
Sat, 23 Jul 2016 06:14:42 +0000 (16:14 +1000)
Patch from vinschen at redhat.com.

configure.ac
defines.h

index 21ef389887881d09fb5f111489dd8d33b6a9d449..e64386f063378627ab3e48d74475e3a83c0df785 100644 (file)
@@ -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])
index a438ddd742f7759f70846df1be351a93f943cd50..1b71d3e01a92c3f71ca50659f52b181a31b56f65 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -42,6 +42,19 @@ enum
 # define SHUT_RDWR SHUT_RDWR
 #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)
  */