+------ "J.D. Bronson" wrote (Fri, 17-Oct-2008, 19:07 -0500):
|
| (Using Sun Studio 12 with all patches and OS fully patched)
|
| 4.1.30, 4.1.31, 5.0.4 all fail on arc4random.c
|
| [4.1.29 compiles just fine....]
Similar problems on Solaris 8 SPARC. See:
http://sourceforge.net/tracker/index.php?func=detail&aid=2063742&group_id=169098&atid=849053
As said there, the patch gets the compile to complete, but I haven't
tested the result (I have 4.1.29 installed, and it is likely to be
a while before I get back to this). The same patch submitted there
is included below. Let us know if it actually works. 8-)
HTH,
Chuck
--
Charles Seeger
[EMAIL PROTECTED]
--- arc4random.c.orig 2008-07-26 16:08:18.000000000 -0400
+++ arc4random.c 2008-09-07 22:10:35.738378000 -0400
@@ -18,6 +18,9 @@
#ifdef __FreeBSD__
# include <sys/libkern.h>
#endif
+#ifdef SUNDDI
+# include <sys/conf.h> /* uniqtime() decl from <sys/systm.h> */
+#endif
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/time.h>
@@ -25,6 +28,9 @@
#include <sys/socket.h>
#include <net/if.h>
#include <netinet/in.h>
+#ifdef SOLARIS2
+# include <netinet/in_systm.h> /* n_long typedef */
+#endif
#include <netinet/ip.h>
#include "netinet/ip_compat.h"
#include "md5.h"
@@ -43,7 +49,11 @@
static u_int8_t arc4_randbyte(void);
static int ipf_read_random(void *dest, int length);
+#ifdef __SUNPRO_C
+static inline void
+#else
static __inline void
+#endif
arc4_swap(u_int8_t *a, u_int8_t *b)
{
u_int8_t c;