trouble compiling squid 2.0 PATCH 2

From: Anand Buddhdev <me@dont-contact.us>
Date: Mon, 9 Nov 1998 12:34:40 +0300

I'm having trouble compiling squid 2.0 PATCH 2 on my BSDI 2.1 system. This
is the error I receive:

gcc -o squid -g access_log.o acl.o asn.o authenticate.o cache_cf.o .. ..

event.c:82: Undefined symbol _drand48 referenced from text segment
*** Error code 1

Stop.
*** Error code 1

Stop.

On perusing the source code, I notice that it's calling a function called
drand48. The author has put in a comment that drand48 is not portable, and
so may not be available on all systems. I looked around and only managed to
find random and srandom in my BSDI 2.1. What can I use as an alternative?
The relevant snippet of code is here:

--- code snippet begin -----
eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int
weigh
t)
{
    if (delta_ish >= 3.0) {
            const double two_third = (2.0 * delta_ish) / 3.0;
        delta_ish = two_third + (drand48() * two_third);
    /*
     * I'm sure drand48() isn't portable. Tell me what function
     * you have that returns a random double value in the range 0,1.
     */
                           }

eventAdd(name, func, arg, delta_ish, weight);
---- code snippet end ----

Thanks,

--
Anand
Received on Mon Nov 09 1998 - 02:54:53 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:59 MST