|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75529 No sys_getloadavg() function under uClibc
Submitted: 2017-11-15 20:37 UTC Modified: -
From: diniboy74 at gmail dot com Assigned:
Status: Open Package: *General Issues
PHP Version: 7.1.11 OS: embedded Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: diniboy74 at gmail dot com
New email:
PHP Version: OS:


 [2017-11-15 20:37 UTC] diniboy74 at gmail dot com
On uClibc, there is no sys/loadavg.h header file, therefore the usability of sys_getloadavg() function going to be disabled during the configure time.

But, we have a /proc/loadavg on uClibc, which returns the following:

0.03 0.03 0.00 2/322 19121

I would really appreciate a patch to solve this.


Actual result:
configure:12460: checking for sys/loadavg.h
conftest.c:128:25: fatal error: sys/loadavg.h: No such file or directory
 #include <sys/loadavg.h>
| #include <sys/loadavg.h>
configure:14430: checking for getloadavg
/i-data/bf835951/build/php-7.1.11/conftest.c:210: undefined reference to `getloadavg'
| /* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
| #define getloadavg innocuous_getloadavg
|     which can conflict with char getloadavg (); below.
| #undef getloadavg
| char getloadavg ();
| #if defined __stub_getloadavg || defined __stub___getloadavg
| return getloadavg ();


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 24 22:01:29 2024 UTC