Bug #4152: microtime.c compilation error

From: Date: Sat, 15 Apr 2000 17:26:50 +0000
Subject: Bug #4152: microtime.c compilation error
Groups: php.dev 
Request: Send a blank email to php-dev+get-17933@lists.php.net to get a copy of this message
From: max@vilimpoc.org Operating system: Linux 2.3.36 SMP Tue Jan 4 18:57:22 EST 2000 i586 PHP version: 3.0.15 PHP Bug Type: Installation problem Bug description: microtime.c compilation error Configured PHP4 RC1 with following options: ./configure --with-apxs=/web/apache/bin/apxs --with-mysql --with-gdbm --with-ndbm --with-db2 --with-db3 --with-dom=/usr/lib --with-mm --with-openssl --with-regex=php While running 'make', you may run into the following error: microtime.c: In function `php_if_getrusage': microtime.c:97: storage size of `usg' isn't known microtime.c:100: `RUSAGE_SELF' undeclared (first use in this function) microtime.c:100: (Each undeclared identifier is reported only once microtime.c:100: for each function it appears in.) microtime.c:106: `RUSAGE_CHILDREN' undeclared (first use in this function) microtime.c:110: warning: implicit declaration of function `getrusage' microtime.c:97: warning: unused variable `usg' make[3]: *** [microtime.lo] Error 1 make[3]: Leaving directory `/web/src/php-4.0RC1/ext/standard' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/web/src/php-4.0RC1/ext/standard' make[1]: *** [all] Error 1 make[1]: Leaving directory `/web/src/php-4.0RC1/ext' make: *** [all-recursive] Error 1 To fix this: Open up php_config.h and search for: HAVE_SYS_RESOURCE_H Uncomment and change the line from: /* Define if you have the <sys/resource.h> header file. */ /* #undef HAVE_SYS_RESOURCE_H */ to: /* Define if you have the <sys/resource.h> header file. */ #define HAVE_SYS_RESOURCE_H This seemed to take care of it for me. That and possibly forcing a #define <[directory containing]/resource.h> in the ext/standard/microtime.c Cheers!

« previous php.dev (#17933) next »