Tom Lane wrote:
> [EMAIL PROTECTED] (Bruce Momjian) writes:
> > Add include needed for new getrusage() call.
> 
> If that's actually needed, how did the code build before?  It's always
> included sys/resource.h, except possibly on machines without getrusage
> ... are there any?  I was thinking rusagestub was dead code, myself.

Uh, all I know is that it started failing yesterday.  The failure I got
was:

        gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline
        -fno-strict-aliasing -O1 -Wall -Wmissing-prototypes
        -Wmissing-declarations -Wpointer-arith -Wcast-align
        -I../../../src/include -I/usr/local/include/readline
        -I/usr/contrib/include -DWIN32_STACK_RLIMIT=4194304  -c -o postgres.o
        postgres.c
        In file included from postgres.c:31:
        /usr/include/sys/resource.h:63: field `ru_utime' has incomplete type
        /usr/include/sys/resource.h:64: field `ru_stime' has incomplete type
        gmake: *** [postgres.o] Error 1

and resource.h has:

        struct  rusage {
            struct timeval ru_utime;    /* user time used */
            struct timeval ru_stime;    /* system time used */

so it is timeval it wanted. But I have:

        #define HAVE_GETRUSAGE 1

For me, 'struct timeval' is coming in via #include "libpq/libpq.h", but
of course that is _after_ the inclusion of resource.h.  Not sure where
you see that sys/resource.h was always there.  Looking at the CVS diffs
I see it added only in the past day.

-- 
  Bruce Momjian   [EMAIL PROTECTED]
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to