Commit Graph

3 Commits

Author SHA1 Message Date
Alexander Clouter
9ba79974e7 re-enable cpu_sup.patch for Erlang now it compiles 2018-09-27 21:48:49 +02:00
Fredrik Fornwall
aed31a04af erlang: Disable broken patch
The patch caused the following errors:

cpu_sup.c:346:33: error: expected expression
    case AVG1:          (unsigned int)(return info.loads[0] / 256);
                                       ^
cpu_sup.c:347:33: error: expected expression
    case AVG5:          (unsigned int)(return info.loads[1] / 256);
                                       ^
cpu_sup.c:348:33: error: expected expression
    case AVG15:         (unsigned int)(return info.loads[2] / 256);
                                       ^
cpu_sup.c:351:26: error: use of undeclared identifier 'avgs'
    sendi((unsigned int)(avgs[idx] * 256));
                         ^
cpu_sup.c:351:31: error: use of undeclared identifier 'idx'
    sendi((unsigned int)(avgs[idx] * 256));
                              ^
5 errors generated.
2018-09-27 21:06:33 +02:00
Alexander Clouter
aef83cad47 Make Erlang's cpu_sup function better on Android
Due to `/proc` restrictions in newer Android releases enforced by SELinux, Erlang needs a fix so that it can get some basic CPU stats (use the `sysinfo` syscall rather than reading `/proc/loadavg`).
2018-09-27 20:56:06 +02:00