[libdispatch-dev] libdispatch compiles under Linux but arc4random(3) is missing

Jordan K. Hubbard jkh at apple.com
Sun Nov 15 19:27:03 PST 2009

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/libdispatch-dev/attachments/20091115/96f334e5/attachment.html>

More information about the libdispatch-dev mailing list