On Nov 15, 2009, at 6:09 PM, Mark Heily wrote:
Good news: libdispatch now compiles successfully under Linux using libkqueue r96 or higher.
The test programs in the testing/ directory fail to link because arc4random(3) is not available on Linux. I found a compatibility function written for BIND that might work; the URI is:
http://mirror.its.uidaho.edu/pub/netbsd/NetBSD-current/src/external/bsd/bind/dist/lib/isc/random.c
See below for the actual code. Any objections to adding something like this to libdispatch?
I'm not sure I really see why... This is something that should logically be handled instead by a HAVE_ARC4RANDOM check, with the alternate sides of the #ifdef being the appropriate calls to srand() and rand(), just as the ISC has done. No need to add shims just for the use of a single library, in other words. Am I missing something?
- Jordan