I have added stdio.h to getrusage.c to fix this problem, in both trees.
> Bruce,
> Regarding your inquiry, I looked into stdio.h and (lo and behold) this is the
> definition.
>
> #ifndef NULL
> #define NULL 0
> #endif
>
> I'm not sure why I had to add it to the Postgres source file to avoid
> compilation errors, since the definition in stdio.h is identical.
>
> Troy Hanson
>
> Bruce Momjian wrote:
> >
> > Please find the NULL define in your system header, and tell me what it
> > is so I can include that in the file. Could be in stdio.h?
> >
> > > On SCO OpenServer 3.2.5, I get an error when compiling
> > > pgsql/src/backend/port/getrusage.c . NULL is undefined:
> > >
> > > make -C port all
> > > make[2]: Entering directory `/home/postgres/pgsql/src/backend/port'
> > > cc -b elf -I../../include -I../../backend -dy -I.. -c getrusage.c
> > > "getrusage.c", line 26: error: undefined symbol: NULL
> > > make[2]: *** [getrusage.o] Error 1
> > >
> > > The simple fix is to add these three 3 lines to the file:
> > >
> > > #ifndef NULL
> > > #define NULL 0
> > > #endif
> > >
> > > Troy Hanson
> > > thanson@goldengate.net
> > >
> > >
> > >
> >
> > --
> > Bruce Momjian | http://www.op.net/~candle
> > maillist@candle.pha.pa.us | (610) 853-3000
> > + If your life is a hard drive, | 830 Blythe Avenue
> > + Christ can be your backup. | Drexel Hill, Pennsylvania 19026
>
-- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026