> You need to port ETSRandomDev() function (either the Linux version or
> the generic one) to NetBSD, because AFAIK srandomdev() isn't available
> on NetBSD.
> The error you get means the generic function cannot be compiled.
> 'timeval' is POSIX-compliant, you should be able to get it working by
> including the right header. I suppose NetBSD supports it.
> <http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/time.h.html
> >
> Take a look at ETUUID.m to understand what I mean more precisely.

Looks like just changing your ifdef blocks so that the headers get included in 
all non-Free/Open/Dragonfly cases, instead of only the Linux case, fixes it.  
Diff against 0.4.1......


--- Frameworks/EtoileFoundation/Source/ETUUID.m.orig    2009-03-17 
08:18:26.000000000 -0500
+++ Frameworks/EtoileFoundation/Source/ETUUID.m 2009-11-10 11:15:39.000000000 
-0600
@@ -15,7 +15,7 @@
 // time and pid to seed the random number generator.
 #if defined(__FreeBSD__) || defined(__OpenBSD) || defined(__DragonFly__)
 #define INITRANDOM() srandomdev()
-#elif defined(__linux__)
+#else
 #include <sys/time.h>
 #include <time.h>
 #include <sys/types.h>
@@ -23,6 +23,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <errno.h>
+#if defined(__linux__)
 /** Returns a strong random number which can be used as a seed for srandom().
     This random number is obtained from Linux entropy pool through /dev/random.
     Unlike /dev/urandom, /dev/random blocks when the entropy estimate isn't
@@ -83,6 +84,7 @@
 }
 #define INITRANDOM() ETSRandomDev()
 #endif
+#endif
 #import "Macros.h"
_______________________________________________
Etoile-discuss mailing list
Etoile-discuss@gna.org
https://mail.gna.org/listinfo/etoile-discuss

Répondre à