Solaris 2.5.1 patch
Andy Sloane
andy at guildsoftware.com
Sun Jan 23 03:58:39 EST 2000
Aside from the u_int_8 thing, Solaris 2.5.1 has some other problems. For
some reason even the newest gcc's preprocessor can't grok
#define blah (x,y) (stuff using x and y)
as opposed to
#define blah(x,y) (stuff using x and y).
also, getsockname() expects its "tolen" parameter to be initialized for
some reason.
This patch seems to fix any problems with 2.5.1. It includes my own
version of the uint8 hack.
-Andy.
-------------- next part --------------
diff -ur old/openssh-1.2.1pre27/bsd-snprintf.c openssh-1.2.1pre27/bsd-snprintf.c
--- old/openssh-1.2.1pre27/bsd-snprintf.c Mon Dec 27 17:19:16 1999
+++ openssh-1.2.1pre27/bsd-snprintf.c Sat Jan 22 10:39:45 2000
@@ -44,7 +44,7 @@
#include <setjmp.h>
#ifndef roundup
-#define roundup (x, y) ((((x)+((y)-1))/(y))*(y))
+#define roundup(x,y) ((((x)+((y)-1))/(y))*(y))
#endif
static int pgsize;
diff -ur old/openssh-1.2.1pre27/defines.h openssh-1.2.1pre27/defines.h
--- old/openssh-1.2.1pre27/defines.h Sun Jan 16 16:59:41 2000
+++ openssh-1.2.1pre27/defines.h Sat Jan 22 10:17:02 2000
@@ -83,6 +83,7 @@
typedef uint64_t u_int64_t;
# define HAVE_U_INTXX_T 1
# else
+typedef unsigned char u_int8_t;
# if (SIZEOF_SHORT_INT == 2)
typedef unsigned short int u_int16_t;
# else
diff -ur old/openssh-1.2.1pre27/packet.c openssh-1.2.1pre27/packet.c
--- old/openssh-1.2.1pre27/packet.c Thu Jan 13 22:45:50 2000
+++ openssh-1.2.1pre27/packet.c Sat Jan 22 10:32:14 2000
@@ -138,6 +138,8 @@
struct sockaddr_storage to;
socklen_t tolen;
+ tolen = sizeof(to);
+
memset(&to, 0, sizeof(to));
if (getsockname(connection_out, (struct sockaddr *)&to, &tolen) < 0)
return 0;
More information about the openssh-unix-dev
mailing list