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.
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`).