lkinley / Net-SSH-Perl

Development on the Net::SSH::Perl module to support latest ciphers, key exchange mechanisms, etc.
Other
14 stars 9 forks source link

Patch for bug 116323 #4

Closed whindsx closed 7 years ago

whindsx commented 7 years ago

https://rt.cpan.org/Ticket/Display.html?id=116323

On Solaris blowfish will not compile without the C99 type standard ex. uint32_t

Fix is to substitute u_intXX_t with uintXX_t for blf.h and blowfish.c

lkinley commented 7 years ago

How about this:

diff --git a/src/blowfish/blf.h b/src/blowfish/blf.h
index e32863e..a70041c 100644
--- a/src/blowfish/blf.h
+++ b/src/blowfish/blf.h
@@ -42,6 +42,13 @@
 #define BLF_MAXKEYLEN ((BLF_N-2)*4)    /* 448 bits */
 #define BLF_MAXUTILIZED ((BLF_N+2)*4)  /* 576 bits */

+#ifndef u_int32_t
+       typedef uint32_t u_int32_t;
+#endif
+#ifndef u_int8_t
+       typedef uint8_t u_int8_t;
+#endif
+
 /* Blowfish context */
 typedef struct BlowfishContext {
        u_int32_t S[4][256];    /* S-Boxes */
whindsx commented 7 years ago

Yeah, that works too. Just don't forget u_int16_t.

lkinley commented 7 years ago

Got it. Ok, this will be in 2.07 which will be released soon.