[DGD]Bug or just me?

Björn Källarsson bik at xinit.se
Fri Dec 18 09:34:37 CET 1998


On Fri, 18 Dec 1998, Neil McBride wrote:

> Hiyas,
> 
> I'm just curious if this is an incompatibility with the OS I'm using or
> whether I'm doing something else completely wrong? When compiling DGD, I
> end up with the following error: -
> 
> cp unix/random.c random.c
> gcc -I. -I.. -O2 -DLINUX     -c random.c -o random.o
> random.c:3: conflicting types for `random'
> /usr/include/stdlib.h:218: previous declaration of `random'
> make[1]: *** [random.o] Error 1
> make[1]: Leaving directory `/home/casti/dgd/src/host'
> make: *** [a.out] Error 2
> 
> The system is running rehat 5.x with kernel 2.0.35 and gcc 2.7.2.3. To
> fix the problem, I simply edit the dgd/src/hosts/unix/random.c file and
> comment out line 3 thus removing the problem. Am I doing something wrong
> or is this some sort of bug?

You're not doing anything wrong. The linux includes already declared
random and when another declaration appears gcc complains. I suggest a
simple fix in src/host/unix/random.c:

#ifndef LINUX

extern long random	P((void));

#endif

> Cheers,
> 
> Neil.

--                                              __
Björn                                           \ \//
                                    -- b i k  @  \ \  i n i t . s e --
                                                //\_\


List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list